<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-375315255567275930</id><updated>2012-01-21T03:20:03.865+05:30</updated><category term='ruby'/><category term='logging'/><category term='startup-saturday'/><category term='animals'/><category term='Visual Studio'/><category term='education'/><category term='wildLife'/><category term='mongo'/><category term='debugging'/><category term='gyaan'/><category term='C'/><category term='funding'/><category term='build-systems'/><category term='JS'/><category term='algorithms'/><category term='time management'/><category term='xul'/><category term='OSS'/><category term='Web'/><category term='gnome'/><category term='C++'/><category term='ISP'/><category term='node'/><category term='memories'/><category term='GSoC'/><category term='nokia'/><category term='Mozilla'/><category term='planning'/><category term='rails'/><category term='thoughts'/><category term='internet'/><category term='IRC'/><category term='nodejs'/><category term='script'/><category term='windows'/><category term='vim'/><category term='stanford'/><category term='e-learning'/><category term='csv'/><category term='Networks'/><category term='hardware'/><category term='laptop'/><category term='backup'/><category term='tech-also'/><category term='database'/><category term='extensions'/><category term='business'/><category term='duty'/><category term='research'/><category term='NBF'/><category term='security'/><category term='programming'/><category term='mongoid'/><category term='startup'/><category term='contacts'/><category term='ml-class'/><category term='DLL'/><category term='humour'/><category term='openssl'/><category term='government'/><category term='entrepreneurship'/><category term='cloud'/><category term='Doddappa'/><category term='policies'/><category term='VB'/><category term='ml'/><category term='blog'/><category term='hostel'/><category term='mongodb'/><category term='gnu-screen'/><category term='Bookmarks'/><category term='C#'/><category term='bluetooth'/><category term='country'/><category term='headstart'/><category term='Firefox'/><category term='computer-science'/><category term='wireless'/><category term='web-applications'/><category term='coding'/><category term='microsoft'/><category term='career'/><category term='humanity'/><category term='machine-learning'/><category term='code performace'/><category term='swamiji'/><category term='vcf'/><category term='equity'/><category term='CDN'/><category term='gmail'/><category term='Tweaks'/><category term='.NET'/><title type='text'>I Think Tech</title><subtitle type='html'>Odyssey of a an aspiring Brahmana</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default?start-index=101&amp;max-results=100'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>109</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-2208727327649242530</id><published>2012-01-21T02:53:00.000+05:30</published><updated>2012-01-21T03:20:03.882+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='mongoid'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='mongodb'/><title type='text'>Shortcomings of aliased field or attribute names in Mongoid - Part 1</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;blockquote class="tr_bq" style="background-color: #f9f9c5; padding: 10px;"&gt;NOTE: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;The behavior and shortcomings explained below apply to Mongoid versions 2.4.0 (released on 5th Jan, 2012) and releases previous to that. A &lt;a href="https://github.com/mongoid/mongoid/commit/2994efa12c5ffbabd4fb3d521123e94c248b0aef" target="_blank"&gt;recent commit&lt;/a&gt; made on 10 Jan, 2012 fixes all these shortcomings.&lt;/li&gt;&lt;li&gt;For those using the affected versions (all Rails 3.0 developers), &lt;a href="https://gist.github.com/1649542" target="_blank"&gt;this monkey patch&lt;/a&gt; will address the shortcomings.&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;br /&gt;In my previous post I wrote about getting a &lt;a href="http://techbrahmana.blogspot.com/2012/01/getting-list-of-aliased-keyattribute.html"&gt;list of aliased field names&lt;/a&gt;. From that post it might be evident that dealing with aliased field names is not that straight forward in Mongoid. I am using Mongoid v2.2.4 which the latest version working with Rails 3.0. Mongoid v2.3 and later require ActiveModel 3.1 and hence Rails 3.1.&lt;br /&gt;&lt;br /&gt;Anyways, aliased field names have these shortcomings :&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;Accessor methods are defined only with the aliased names and not the actual field names.&lt;/li&gt;&lt;li&gt;Dirty attribute tracking methods are not defined for the aliased names.&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;attr_protected&lt;/span&gt;, if used, should be used with both short and long forms of field names.&lt;/li&gt;&lt;/ol&gt;Writing about all three in a single post would result in an awfully long post. So I will put details about each of these in their own&amp;nbsp; posts, starting with the first one in this post.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Accessor methods are defined only with the aliased names and not the actual field names.&lt;/h3&gt;&lt;br /&gt;Consider the following model definition:&lt;br /&gt;&lt;pre class="brush: ruby"&gt;class User&lt;br /&gt;  include Mongoid::Document&lt;br /&gt;&lt;br /&gt;  field :fn, as: :first_name&lt;br /&gt;  field :ln, as: :last_name&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;I would have expected the additional accessor methods names&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; 'first_name', 'first_name=', 'last_name' and 'last_name='&amp;nbsp;&lt;/span&gt; to be simple wrapper methods which just forward the calls to the original accessor methods :- &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;'fn', 'fn=', 'ln' and 'ln='&lt;/span&gt;. But Mongoid just doesn't create the shorter form of the accessor methods at all.&lt;br /&gt;&lt;pre class="brush: ruby"&gt;user = User.new&lt;br /&gt;user.respond_to?(:fn)         # Returns false&lt;br /&gt;user.respond_to?(:ln)         # Returns false&lt;br /&gt;user.respond_to?(:first_name) # Returns true&lt;br /&gt;user.respond_to?(:last_name)  # Returns true&lt;br /&gt;&lt;/pre&gt;This doesn't appear like a problem at first sight because an application developer would use the long form of the methods in the application code. Trouble begins in the dirty tracking methods which use the actual attribute name and consequently the shorter form of field names. Take a look at these parts of Mongoid and ActiveModel:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Definition of setter method for any attribute - &lt;a href="https://github.com/mongoid/mongoid/blob/192bb67ba945af28d4f3792540d40e8d140d48c1/lib/mongoid/fields.rb#L315" target="_blank"&gt;Github link for v2.2.4&lt;/a&gt;&lt;pre class="brush: ruby"&gt;define_method("#{meth}=") do |value|&lt;br /&gt;  write_attribute(name, value)&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;Notice that the field name (i.e. the short form) is being passed to &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;write_attribute&lt;/span&gt;, which eventually gets passed to ActiveModel's dirty attribute tracking method &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;attribute_will_change!&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Definition of the ActiveModel method : &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;attribute_will_change! &lt;/span&gt;-- &lt;a href="https://github.com/rails/rails/blob/v3.0.11/activemodel/lib/active_model/dirty.rb#L153" target="_blank"&gt;Githib link for v3.0.11&lt;/a&gt;&lt;pre class="brush: ruby"&gt;def attribute_will_change!(attr)&lt;br /&gt;  begin&lt;br /&gt;    value = __send__(attr)&lt;br /&gt;    value = value.duplicable? ? value.clone : value&lt;br /&gt;  rescue TypeError, NoMethodError&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  changed_attributes[attr] = value&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;On line no : 3 the method with the same name as that of the attribute's short name is invoked with &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;__send__&lt;/span&gt;. Since Mongoid doesn't define such methods this mostly results in NoMethodError which is caught and swallowed and nothing happens. This is comparatively harmless. But if at all a method with the same already exists, then that method gets called and a lot of unwanted things can happen. In the case of the User model above, the '&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;fn&lt;/span&gt;' just results in NoMethodError, where as the '&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ln&lt;/span&gt;' field could result in any of the following methods :&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Object.ln&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;FileUtils.ln&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Rake::DSL.ln&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That could result in pretty nasty errors about these ln methods and you wouldn't even know why these are being called!. Now whether it is a good practice to name your attributes in a way that clash with already defined methods is a totally different thing. But just remember that the cause of a weird error is probably aliasing.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-2208727327649242530?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/2208727327649242530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2012/01/shortcomings-of-aliased-field-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2208727327649242530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2208727327649242530'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2012/01/shortcomings-of-aliased-field-or.html' title='Shortcomings of aliased field or attribute names in Mongoid - Part 1'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-3957100364144419730</id><published>2012-01-18T04:36:00.000+05:30</published><updated>2012-01-18T04:44:13.535+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='mongoid'/><category scheme='http://www.blogger.com/atom/ns#' term='mongodb'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Getting the list of aliased key/attribute names from a Mongoid model</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;At some point today when I was writing some model specs for one of my Mongoid models, I required the list of all of the attribute/key names. Mongoid provides a handy "&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;fields&lt;/span&gt;" method for this, which returns an hash of key names and &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Mongoid::Fields::Serializable&lt;/span&gt; object pairs. Getting the list of names from that was easy :&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; Model.fields.keys&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;This gives the list of the actual key names. The actual key names, in my case, are very short strings (1 to 3 characters) and I have long aliases for those in my models. What I eventually realized was that I wanted the list of&amp;nbsp; the longer aliased names. Looking around the mongoid code did not give me any direct method. Turns out that the aliased names result in nothing more than a few additional 'wrapper' methods (like the accessors, dirty methods, etc) and there is no table/hash kind of thing maintained anywhere to give the mapping between the actual key name and the aliased ones. So my current guess is that the list of these aliased names is not available directly anywhere.&lt;br /&gt;&lt;br /&gt;So I came up with this hackish way of getting that list of aliased names.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: ruby"&gt;p = Post.new&lt;br /&gt;actual_field_names = p.fields.keys&lt;br /&gt;all_field_names = p.methods.collect { |m| m.to_s.match(/_changed\?$/).try(:pre_match) }&lt;br /&gt;                    .select { |e| e }&lt;br /&gt;aliased_field_names = all_field_names - actual_field_names&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;As mentioned earlier, this is pretty hackish. If you know of a straight forward way, do let me know.&lt;br /&gt;&lt;br /&gt;Note : I eventually found out that I did not actually need this list of aliased names. I did not use this in my project. Nevertheless it works just fine.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-3957100364144419730?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/3957100364144419730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2012/01/getting-list-of-aliased-keyattribute.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/3957100364144419730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/3957100364144419730'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2012/01/getting-list-of-aliased-keyattribute.html' title='Getting the list of aliased key/attribute names from a Mongoid model'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-135470552638829058</id><published>2012-01-01T11:48:00.001+05:30</published><updated>2012-01-01T11:48:45.524+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='web-applications'/><category scheme='http://www.blogger.com/atom/ns#' term='code performace'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='mongo'/><category scheme='http://www.blogger.com/atom/ns#' term='mongodb'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>MongoDB concurrency - Global write lock and yielding locks</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;There has been lot of hue and cry about MongoDB's global write lock. Quite a few people have said (in blog posts, mailing lists etc) that this design ties down MongoDB to a great extent in terms of performance. I too was surprised (actually shocked) when I first read that the whole DB is locked whenever a write happens - i.e a create or update. I can't even read a different document during this time. It did not make any sense to me initially. Previous to this revelation I was very pleased to see MongoDB not having transactions and always thought about that feature as a tool which avoided locking the DB when running expensive transactions. However this global lock sent me wondering whether MongoDB is worth using at all.. !! I was under the assumption that the art of "record level locking" had been mastered by the database developers. This made MongoDB look like a tool of stone age. &lt;br /&gt;&lt;br /&gt;Well I was wrong. Turns out that "Record level locking" is not that easy (and the reasons for that warrant a different post altogether) and from what I understand MongoDB has no plans of implementing such a thing in the near future. However this doesn't mean the DB will be tied up for long durations (long on some scale) for every write operation. The reason is that MongoDB is designed and implemented in ways different than other databases and there are mechanisms in place to avoid delays to a large extent. Here are a couple of things to keep in mind :&lt;br /&gt;&lt;br /&gt;MongoDB uses memory mapped files to access it's DB files. So a considerable chunk of your data resides in the RAM and hence results in fast access - fast read all the time and very fast write without &lt;a href="http://www.mongodb.org/display/DOCS/Journaling" target="_blank"&gt;journaling&lt;/a&gt; and pretty fast write with journaling. This means that for several regular operations MongoDB will not hit the disk before sending the response at all - including write operations. So the global lock that is applied exists only for the duration of time needed to update the record in the RAM. This is orders of magnitude faster than writing to the disk. So the DB is locked for a very tiny amount of time. This global lock is after all not as bad as it sounds at first.&lt;br /&gt;&lt;br /&gt;But then the entire database cannot be in RAM. Only a part of it (often referred to as working set) is in RAM. When a record not present in RAM is requested/updated MongoDB hits the disk. Oh no, wait.. so does that mean the DB is locked while Mongo tries read/write that (slow) disk? Definitely not. This is where the "yield" feature comes in. Since 2.0 MongoDB will yield the lock if it is hitting the disk. This means that once Mongo realizes it is going for the disk, it sort of temporarily releases the lock until the data from disk is loaded and available in RAM.&lt;br /&gt;&lt;br /&gt;Although I still prefer record level locking in MongoDB, these two above mentioned features are sufficient to reinstate my respect and love for MongoDB. :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-135470552638829058?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/135470552638829058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2012/01/mongodb-concurrency-global-write-lock.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/135470552638829058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/135470552638829058'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2012/01/mongodb-concurrency-global-write-lock.html' title='MongoDB concurrency - Global write lock and yielding locks'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-2545450808812967334</id><published>2011-12-12T03:10:00.001+05:30</published><updated>2011-12-12T06:47:29.039+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='entrepreneurship'/><category scheme='http://www.blogger.com/atom/ns#' term='startup'/><category scheme='http://www.blogger.com/atom/ns#' term='headstart'/><category scheme='http://www.blogger.com/atom/ns#' term='startup-saturday'/><category scheme='http://www.blogger.com/atom/ns#' term='funding'/><category scheme='http://www.blogger.com/atom/ns#' term='equity'/><title type='text'>Startup Saturday Bangalore - December-2011 - Should you spend your money or someone else's?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;After hearing a lot about &lt;a href="http://headstart.in/"&gt;Headstart.in&lt;/a&gt; and &lt;a href="http://startupsaturday.headstart.in/" target="_blank"&gt;Startup Saturdays&lt;/a&gt; and after having read a lot about startup communities and their importance in various blogs (&lt;a href="http://www.paulgraham.com/hubs.html" target="_blank"&gt;including Paul Graham's&lt;/a&gt;) I attended this month's Bangalore edition of Startup Saturday. I must say that I totally loved it and am really sad that I did not attend it earlier. Well, better late than never.&lt;br /&gt;&lt;br /&gt;This edition's broad focus was on funding and equity distribution. Here is a link to the &lt;a href="http://startupsaturday.headstart.in/event.php?eid=177" target="_blank"&gt;event description page&lt;/a&gt;. We had &lt;a href="http://www.telibrahma.com/telibrahma/company" target="_blank"&gt;Suresh&lt;/a&gt; from &lt;a href="http://www.telibrahma.com/" target="_blank"&gt;Telibrahma&lt;/a&gt; and &lt;a href="http://www.sloka.in/about-us/management-team" target="_blank"&gt;Sujai&lt;/a&gt; from &lt;a href="http://www.sloka.in/" target="_blank"&gt;Sloka Telecom&lt;/a&gt; sharing their experience and some of the nitty-gritties associated with securing funding for your startup and managing equity and stakes. Here are a few things that I grasped and managed to remember.&lt;br /&gt;&lt;br /&gt;For those in a hurry, there is a tl;dr section at the bottom. I know your time is precious and I blabber a lot. :) &lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;&lt;b&gt;Start your company with an exit clause in the agreement with your partner&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;Suresh pretty much started the discussion with this point. When you start your company decide first off what the founders are going to do with their share of equity in case they leave the company. You might be thinking that it is such a negative thing to start with, but Suresh made it clear enough that it is essential, irrespective it's positive or negative influence. The rationale is that things look very good at the beginning and everyone is absolutely positive and hopeful, but it is very likely that not all founders will share the same amount of enthusiasm and hope as time passes by. Reasons could be various, but it can just happen. One of the founders might just want to move out at some point. Such an event shouldn't derail your company/organization. This is why it is better (and pretty much essential) to have an exit clause in the initial agreement. The specifics can be anything. You might choose to compensate the person moving out based on the amount of years he/she has put in or the initial investment they came in with or whatever. Just be sure that it is there in black and white in an unambiguous way. You do not want a member of your founding team &lt;a href="http://www.ndtv.com/article/india/karnataka-chief-minister-yeddyurappa-agrees-to-quit-after-bjps-unanimous-order-122718" target="_blank"&gt;going out&lt;/a&gt; &lt;a href="http://news.in.msn.com/national/article.aspx?ucsort=2&amp;amp;cp-documentid=5326525" target="_blank"&gt;shouting&lt;/a&gt;, bringing the morale of the team down, now do you?&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Do not hesitate to talk about money and stake. Finalize it ASAP&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;This is sort of a follow-up point to the previous one. Whenever a startup is formed by a group of people, which is very common, specifically by a group of friends, which is even more common, there can be some stigma about discussions around stake and percentages. There might be one or two members who feel that talking about such things very early is a sign of lack of trust and is not really a good way to start with. As Sujai and Suresh said, this isn't really so. It is always better to finalize these matters at the earliest, no matter how delicate they are. In fact you should do it at the earliest because they are delicate. You do not want to be dealing with them in a crunch situation, which might just worsen the case. So act mature and deal with it, of course in a fair way.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Term sheets are very flexible. Use it to achieve a common ground during negotiation&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;It is very common to come up with valuations vastly different from the investor's when you are trying to raise money. In some cases it can be so vast that the middle ground itself is unacceptably far for both the entrepreneur and the investor. For example when raising very early stage funding from an angel investor you might value your company at $1 Million, because you think your idea is kickass and totally innovative and you seem to have a perfect plan. OTOH, the investor values your company at nothing more than $100K, because all you have is an idea and your own expertise/experience. The average of the two numbers is just not acceptable to both of you. But both you and the investor might like each other (the frequency just matches) and you want money and the investor wants to invest. In such a case you can use the term sheet to achieve middle ground. You can tell the investor to give you money at your valuation, and say after a year or two when you go for a bigger round of funding with $5M or $10M valuation, the angel investor will get some perk - like he gets shares at a discount or he gets an outright payout (like interest or dividend on what he invests now) or whatever. But if you fail to reach that goal within the stipulated time, then the angel investor will get some more stake to match "his" initial valuation. &lt;br /&gt;&lt;br /&gt;This is just an example and terms can be anything that you can negotiate for. The idea is that if there is a good match between the entrepreneur and the investor, then the deal should not fall through just because of&amp;nbsp; differences in valuation. This of course doesn't mean that you should accept money at any crappy valuation that an angel or a VC is throwing at you. See the next point. Also you should not expect investors to put in money at insane valuations just because you got a very innovative product. Be reasonable.&lt;br /&gt;&lt;br /&gt;If you are new to Term Sheets check out &lt;a href="http://www.feld.com/wp/archives/2011/11/using-veri-to-understand-term-sheets.html" target="_blank"&gt;this&lt;/a&gt; and &lt;a href="http://www.veri.com/t/understanding-term-sheets/1301" target="_blank"&gt;this&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&amp;nbsp;It's a good deal only when both parties are happy&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;Often entrepreneurs think that investors are out there to squeeze everything they can from the founders and that one has to be very cautious when dealing with investors. What both Suresh and Sujai said was that a good investor will make sure that the founders will get a good deal, even in cases when all that the founders (typically engineers) know about finance is addition and subtraction. The reason is that, if the VC "tricks" the founders into shelling out a lot of equity for a small sum of money, it is very likely that the founders will lose the motivation to keep going. If all that they own (collectively) is something like 20% or 30% they will soon feel like they are slogging for the investor and there is nothing in there for themselves. This is the worst thing that can happen to a startup. If the founders themselves are not motivated enough, the startup will come to a screeching halt in no time. Alternately, another "good" investor might come along and woo the founders away to form a new company where they really have sizable stake and actually feel like "founders". So both entrepreneurs and investors should go home happy after a deal. If you are not happy with the deal it's better you walk away. Sujai even went on to say that it's better not to deal with investors whom you don't think you can work with without two strips of aspirin, even when the valuation is close to what you want or even more. It's just not worth the headache it will eventually generate. But if your company is dying and you are absolutely in need of cash, then it's a different situation altogether.&lt;br /&gt;&lt;br /&gt;This piece of wisdom also applies to equity that is given to the co-founders and early employees. Do not be very stingy is handing out equity. Remember that when you get a co-founder or when you hire someone, you and that person are making a deal too. And like every other deal this one should keep both the parties happy. If you do not give sufficient equity to keep them motivated, eventually they will have no reason to stay with you. They will all be working their asses off. You better keep them motivated. Otherwise someone nicer will come along and take them away to their company with a much better offer. Also investors do consider the equity distribution amongst co-founders and the initial team. If they find it highly distorted they will very likely refrain from investing because they are not confident that the team will stick around. This doesn't mean you give out equity like a charity program. It is good (and often necessary) that you as the founder will retain a majority stake. This brings me to the next point.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;There should be a LEADER&amp;nbsp; -- a MAJORITY STAKE HOLDER&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;As mentioned in the second point, when a group of friends join hands to start a company, the general tendency is to distribute equity equally among themselves. For example 4 friends starting a company might end up owning 25% each. This is very very bad. Both Suresh and Sujai strongly emphasized that there should be a leader (call him/her a CEO or MD or anything) who is also a Majority Stake Holder. It is very common to hit deadlocks, get into conflicts, during product design or in cases when you have &lt;a href="http://www.startuplessonslearned.com/2009/06/pivot-dont-jump-to-new-vision.html" target="_blank"&gt;to pivot&lt;/a&gt; and it becomes essential that there exists a leader who can resolve these conflicts and take a decision. In the absence of a leader the conflict will persist delaying the process or decision making. Time being an essence in startups, such leader-less scenarios lead to the death of a startup, often with the people involved getting upset with each other. Some might say that they prefer to have a "flat hierarchy" and will take collective decisions. It all sounds good, but doesn't really work always. A leader doesn't mean a dictator. The leader will still invariably consult his team before taking any significant decision. Having a leader also makes interaction with outside parties easier. A customer or an investor doesn't have to deal with 3 to 4 people for the same thing. Doing the same work repeatedly is no fun for anyone (unless you are a body building freak).&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;LEADER should act like one. He/She is the face of the company&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;This is something that my manager (also a very good friend and a mentor) at a previous company explained to me when I said I want to go out and join a friend in his start up venture. &lt;br /&gt;Being a leader is not just about holding a title or exercising your superiority during a discussion/conflict. The leader will be the face of the company and is as such thought of as a reflection of the company. When investors put in their money, they invest not just in the idea or the product, but also in the people and very specifically the leader. They expect the leader to steer the company towards success. It is the leader's ability that they trust. Consequently any wrong doing on the leader's part will reflect very poorly on the whole company. Integrity is of utmost importance. For example one might feel a sense of achievement in "tricking" investors with false promises or similar things. But it will create a permanent dent in the image of the company (and also that person). Also, the leader should command respect within the company by virtue of his/her actions and thought process. So choose a wise leader, think a lot before choosing one, especially when you are choosing yourself. (Yeah, the last line is my addition :) )&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&amp;nbsp;You will miss your first deadline - Learn to live with it&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;Almost every startup start's with a "perfect plan" and with the hope and confidence of "perfect execution" of that plan. You look at the money you have and you feel that you are good to go for a year. Then you look at the idea, discuss about the product, make a plan for the implementation, possibly meet potential customers and promise them a delivery date (mostly a very aggressive target). You then foresee that you are going to get money in 8 months or you will be able to raise good amount of money from investors in not more than 10 months. Isn't that fantastic? You are so safe..! &lt;br /&gt;&lt;br /&gt;But this rarely, if not never, happens in reality. Sujai spelled it out that each and everyone of us is going to miss our first deadline/target. So one has to learn to live with it, get over it and continue working towards the target. This doesn't mean that we all plan so badly. It's just that the startup environment is so dynamic. There is a lot of flux and uncertainty. It's better to come mentally prepared for shocks and than to come in overly optimistic and get bogged down by these unexpected setbacks.&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size: large;"&gt;tl;dr&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&amp;nbsp;&lt;/span&gt; Here are the main points. If you find something interesting you can go back up and read it in full.&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;Start your company with an exit clause in the agreement with your partner&lt;/li&gt;&lt;li&gt;Do not hesitate to talk about money and stake. Finalize it ASAP&lt;/li&gt;&lt;li&gt;Term sheets are very flexible. Use it to achieve a common ground during negotiation&lt;/li&gt;&lt;li&gt;It's a good deal only when both parties are happy&lt;/li&gt;&lt;li&gt;There should be a LEADER&amp;nbsp; -- a MAJORITY STAKE HOLDER&lt;/li&gt;&lt;li&gt;LEADER should act like one. He/She is the face of the company&lt;/li&gt;&lt;li&gt;You will miss your first deadline - Learn to live with it&lt;/li&gt;&lt;/ol&gt;This discussion was followed by a product demo by Saptarshi from &lt;a href="http://quikast.com/" target="_blank"&gt;Quikast&lt;/a&gt;. They are building some cool stuff. I wish them all the best. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-2545450808812967334?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/2545450808812967334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2011/12/startup-saturday-bangalore-december.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2545450808812967334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2545450808812967334'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2011/12/startup-saturday-bangalore-december.html' title='Startup Saturday Bangalore - December-2011 - Should you spend your money or someone else&apos;s?'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-7660696209826974519</id><published>2011-11-27T00:25:00.001+05:30</published><updated>2011-11-27T03:43:44.020+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='thoughts'/><category scheme='http://www.blogger.com/atom/ns#' term='entrepreneurship'/><category scheme='http://www.blogger.com/atom/ns#' term='education'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='computer-science'/><title type='text'>A testimonial to one of the best mentors I have had</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I have previously written about my internship at IBM in &lt;a href="http://techbrahmana.blogspot.com/2007/06/ibm-internship-prolouge.html" target="_blank"&gt;this post&lt;/a&gt; and &lt;a href="http://techbrahmana.blogspot.com/2007/07/ibm-internship-part-i-interview.html" target="_blank"&gt;this post&lt;/a&gt;. The first post makes it pretty clear that the internship was a very productive (very likely most productive) part of my engineering student life. The second post briefly talks about Gautham Pai as being my guru. Both are very much true and I am thankful to Gautham for having provided me the opportunity to be on the Eclifox team. Although I have expressed my gratitude to Gautham a few times, I never really wrote it down anywhere, neither in my blog nor on any social n/w site. A few months ago Gautham started his own company &lt;a href="http://www.jnaapti.com/" target="_blank"&gt;Jnaapti&lt;/a&gt;, which is a technical skill development company. Basically he is doing what he is very good at, i.e. bringing the best out of anyone willing to learn and succeed. As part of the company operations he conducts training sessions for various corporate clients and also mentors engineering students helping them understand their subjects better using some useful project as a means of teaching. He is experimenting with various educational methodologies and different ways to teach/mentor students remotely. I am very confident that his efforts are going to change the landscape of computer science engineering education vastly. Having been mentored and guided by Gautham at various points, I thought now would be a good time to pen down a testimonial and finally put that gratitude in words. So here it goes :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;Every software engineer who has been in the industry, even for a small amount of time, surely knows the gap between academic teaching and the industry requirements and the initial uphill task of coping up when a fresh engineering graduate joins any company. It would not have been different for me, if not for Gautham's guidance as my senior at college and my mentor at IBM during my internship. With Gautham's mentoring, the internship was probably one of the most productive spans in my 4 years of engineering studies and also the one packed with maximum learning. Additionally it opened up a number of opportunities for me which I previously did not even know existed - like my participation in &lt;a href="http://techbrahmana.blogspot.com/2007/06/my-gsoc-2007-story.html" target="_blank"&gt;Google Summer code&lt;/a&gt; and later &lt;a href="http://techbrahmana.blogspot.com/2007/10/first-check-in-of-my-code-into-mozilla_25.html" target="_blank"&gt;being with the Mozilla&lt;/a&gt; &lt;a href="https://wiki.mozilla.org/User:Brahmana" target="_blank"&gt;community for quite some time&lt;/a&gt; and many others.&lt;br /&gt;&lt;br /&gt;Traits like general intelligence, theoretical understanding of the subjects and the ability to solve problems are undoubtedly necessary, but not sufficient. An engineer should be able to think not just about the next line of the code that he is going to write but also think about product that he is building or helping build. He should also know that any technology is just a tool to get the work done and not something that limits you. That way you just pick any new tool that you come across and find useful or necessary for the job. This also means you keep up with the latest happenings in the tech world via blogs, articles, mailing lists etc. Above all the zeal to do more, to come up with new ideas, to start executing those ideas and the persistence to see them through, in the course carefully managing a team as a leader, are what will make an engineer truly successful.&lt;br /&gt;&lt;br /&gt;I, of course, did not realize or understand all this during my internship. These were not handed out to me in bulleted list of To-Dos. Rather it was all nicely baked into the project that I (with a few friends) carried out and I was set on the right path without any additional effort. More than that, all of this was demonstrated to us in practice by Gautham himself and some of it just rubbed off on me, making me a much better problem solver, much better product developer, much better ENGINEER, than I would have been otherwise. Now when I look back at my internship days and my days as an engineer after that, I clearly see the impact and how much it has helped. That's Gautham and his way of mentoring. Thank you Gautham for letting me be part of the Eclifox team and for your guidance till date and the future too. :). (For the readers : Eclifox was what we built during our internship - &lt;a href="http://buzypi.in/2007/10/11/eclifox-bringing-eclipse-to-the-browser/" target="_blank"&gt;http://buzypi.in/2007/10/11/&lt;wbr&gt;&lt;/wbr&gt;eclifox-bringing-eclipse-to-&lt;wbr&gt;&lt;/wbr&gt;the-browser/&lt;/a&gt;&amp;nbsp; and I am very proud of it.)&lt;/blockquote&gt;&amp;nbsp;In case you are wondering where did all of this finally land me, here is my &lt;a href="http://www.linkedin.com/in/srirang" target="_blank"&gt;linkedIn profile&lt;/a&gt;. :)&lt;br /&gt;Keep up the great work Gautham. Wish you all the success and happiness.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-7660696209826974519?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/7660696209826974519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2011/11/testimony-to-one-of-best-mentors-i-have.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/7660696209826974519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/7660696209826974519'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2011/11/testimony-to-one-of-best-mentors-i-have.html' title='A testimonial to one of the best mentors I have had'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-6301920136839891140</id><published>2011-11-25T09:19:00.001+05:30</published><updated>2011-11-25T09:57:39.448+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Networks'/><category scheme='http://www.blogger.com/atom/ns#' term='microsoft'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><category scheme='http://www.blogger.com/atom/ns#' term='computer-science'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Transactions - both single node and distributed - are hardwired in Windows - since Win 95</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Transactions or "Atomic Transactions" to be precise, are very well known to anyone who has worked with databases. With the recent advent of NoSQL databases and the CAP theorem being used/abused by anyone and everyone, words like "consistency" and "transactional model" have become run-of-the-mill jargon. But what is actually interesting is that the concept of transactions or transactional model goes beyond our typical RDBMS. Things get even more challenging when we try to achieve transactions in a distributed system. Because transactions inherently lock the resource(s)/data they are operating on until the transaction completes, those resources can become inaccessible altogether very easily in a distributed setup if one of the node fails or if there is some problem with the network or any such thing, there by increasing the complexity of implementing distributed transactions by many folds compared to transactions on a single node.&lt;br /&gt;&lt;br /&gt;Today I was trying to figure out if there is a way to "simulate" (albeit it will be very crude) some sort of transactions in my application which uses MongoDB (which doesn't support transactions by design - to avoid the locking mentioned above, although ironically there is a global write lock..!!). Searching on the internet lead me to &lt;a href="http://ayende.com/blog/23553/yoursquo-ll-pry-transactions-from-my-dead-cold-broken-hands" target="_blank"&gt;this blog of a Raven DB developer&lt;/a&gt;. The author there mentions that RavenDB supports both sharding and transactions, which means it has implemented distributed transaction support. At first read I was pretty impressed (this was the first time I had heard about RavenDB). Before I could ask the author about the implementation details I saw a comment in which the author had mentioned that they use DTC (which again was a new thing). Turns out DTC, Distributed Transaction Controller, is a service that is baked right in the Windows OS itself, that too dating back to the Windows 95 days (wow.. now I am impressed with Windows..!). Here is &lt;a href="http://msdn.microsoft.com/en-us/library/ms679938%28v=VS.85%29.aspx" target="_blank"&gt;the MSDN article&lt;/a&gt; describing the service.&lt;br /&gt;&lt;br /&gt;The MSDN article clearly explains the basics of distributed transactions and how it is modeled. What is worth noting is that, by abstracting out the code for carrying out distributed transactions as a service, multiple resource managers (like different databases, queue servers, file servers/managers, etc..) can all interact together in a single transaction. For example, lets say that you have web application where in a client request results in a job being picked up from a queue for processing and simultaneously you update the status of the job in a DB and also create a new file associated with the start of the job. Very evidently all the three resource managers and the web application itself can be (very likely will be) on different nodes. With something like DTC you can easily create a new transaction, send across a commit message and you will get a success notification only if all three actions were successful or else none of the actions go through. Of course, this is possible only if all the three resource managers involved here adhere to the Microsoft's DTC specification and provide the necessary interface to work with it.&lt;br /&gt;&lt;br /&gt;The previous example might make DTC appear like this Jason Bourne kind of super dude who can take care of all the heavy lifting and also do it very efficiently. But remember even Bourne gets shot at and also loses his girl. So DTC is not fully immune to problems either. Here is one &lt;a href="http://blog.jonathanoliver.com/2011/04/my-beef-with-msdtc-and-two-phase-commits/" target="_blank"&gt;blog post titled "My beef with MSDTC and two phase commits"&lt;/a&gt;. It is definitely worth reading. Note that my impression about DTC is purely based on reading the documentation. I have not written a single line of code using DTC.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-6301920136839891140?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/6301920136839891140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2011/11/transactions-both-single-node-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6301920136839891140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6301920136839891140'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2011/11/transactions-both-single-node-and.html' title='Transactions - both single node and distributed - are hardwired in Windows - since Win 95'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-3119288797845556295</id><published>2011-11-16T00:45:00.001+05:30</published><updated>2011-11-16T02:01:26.245+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='research'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Networks'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='wireless'/><category scheme='http://www.blogger.com/atom/ns#' term='microsoft'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Microsoft's Virtual Wifi adapter ( or virtual wifi card) -- cool technology</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I wasn't aware of the very interesting research on Virtual Wifi Adapters that Microsoft guys have been carrying out. Apparently they have been doing it for quite some time now. What this research group is trying to do is basically allow us to have an unlimited number of "virtual" wireless cards on our computers, each connecting to a different wireless connection, and all of it using just a single physical card. That is some awesome stuff.. !&lt;br /&gt;&lt;br /&gt;A couple of days ago I opened up the Dell Support Center tool on my laptop and it popped up a message saying a device on my system is in the disabled state. I was pretty startled to see that, as pretty much every device on my laptop is used by me daily. On clicking the message it told me that the disabled device is "Microsoft Viritual Wifi Miniport". That did not make any sense to me. I had absolutely no clue about this device.&lt;br /&gt;&lt;br /&gt;Searching the internet led me to &lt;a href="http://msdn.microsoft.com/en-us/library/dd815243%28VS.85%29.aspx"&gt;this Microsoft page&lt;/a&gt; (along with several others, of course) which gave me a fair idea of what this device might be, but nothing concrete. It was this &lt;a href="http://www.istartedsomething.com/20090516/windows-7-native-virtual-wifi-technology-microsoft-research/"&gt;fine article on istartedsomething.com&lt;/a&gt; that clearly explained what this is all about. In the same article the author tells us that Microsoft has been carrying out research in this regard for a few years now. But nothing was given to end users until Windows 7 baked in this wifi card virtualization natively. And not just that, all WiFi card providers are expected to add support for this virtualization in their drivers if they want their drivers to be properly signed digitally and recognized by Windows during installation. I say that is "Wicked cool".. :)&lt;br /&gt;&lt;br /&gt;About the technology itself, it can be described as a way to make "software copies" of your Wireless card and use those copies to "connect to multiple networks simultaneously".&amp;nbsp; Although research prototypes can apparently create any number of virtual devices over the single actual hardware device, Windows 7 limits it to just one copy/virtual device.&lt;br /&gt;&lt;br /&gt;This whole research is doubly fascinating.&lt;br /&gt;&lt;br /&gt;First because the applications of this research work are very interesting. One such application is explained in the article mentioned above. It talks about being able to connect to an existing wireless access point with your laptop and at the same time making your laptop a wireless access point in itself. It means, if someone is far from the actual access point and your laptop happens to be closer, he/she can connect to your laptop instead and your laptop will forward their connections to the actual wireless access point. Of course, this can only happen when the two laptops involved are in the same security/trust group. I wouldn't go on and connect via some random stranger's laptop. It is like letting that person look at all the data coming in and going out of your computer over the internet (or network in general). Despite such caveats, this is very much a practical use case. May be you wouldn't use it to be a hop in the network (or more like a virtual signal booster), but you may use it to make P2P/direct connections with another laptop close by for sharing files instead of doing over the wireless LAN. Or, if access to wireless network is possible only after you authenticate via certificate (like in a corporate setup) and the certificates can be put only one of your laptops (the official company laptop), the connection sharing will indeed come in handy.&lt;br /&gt;&lt;br /&gt;Secondly, and more importantly, the complexities associated with this are lot and that makes it all the more exciting. If we delve a little deeper into what this virtual adapter is and how it works, we will see that it is actually a piece of software sitting between the actual device driver and the rest of the network stack (i.e. all above the MAC layer in the OSI model). This little piece of software is supposed to appear as one or more "devices" to the OS and hence it invariably has to have its own device driver. That is the "Virtual WiFi Filter" driver or VWifi driver. This VWifi driver tells the OS that there are multiple wireless cards and the OS then allows the user to connect to different available wireless connections via these virtual cards. But note that all this time, there is only one physical card and hence at any given point in time that one physical card can be connected to (or can communicate with) only one wireless network. It is the job of the virtual adapter software to cycle over all the virtual wireless cards and service the network requests made through them using the one physical card, in a time shared manner all the while keeping it transparent to the user. Although it sounds very similar to the kernel's process scheduling which makes use of the single processor in a time shared manner, this is actually somewhat different because of the way wireless networks work.&lt;br /&gt;&lt;br /&gt;Note that different wireless networks behave differently. They might be operating at different frequencies, they might be having different authentication/encryption schemes, the bandwidth might be different and probably many other factors that I can't think of right now. So every time the actual wireless card switches to a different connection, there can be a shift in all or some of the above mentioned attributes. The card might have to step up or down its operating frequency, change to a different encryption scheme and all of this on the fly. Now that is a lot of work to do and in fact all of this switching can just drag the network performance to the ground. This makes the design and implementation of the virtualization software pretty challenging. This and many other challenges/caveats are discussed in this &lt;a href="http://research.microsoft.com/en-us/um/redmond/projects/virtualwifi/faq.htm"&gt;Microsoft Research's FAQ page.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I have been very excited about this research work ever since I read it and have been meaning to try out writing some network code using the virtual adapter. Sadly I have zero experience in network programming in Windows and currently don't have enough time to read up all of that. I hope such a thing will come up in Linux some time soon, if it isn't already there. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-3119288797845556295?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/3119288797845556295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2011/11/microsofts-virtual-wifi-adapter-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/3119288797845556295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/3119288797845556295'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2011/11/microsofts-virtual-wifi-adapter-or.html' title='Microsoft&apos;s Virtual Wifi adapter ( or virtual wifi card) -- cool technology'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-6174360877971350258</id><published>2011-10-30T02:07:00.002+05:30</published><updated>2011-10-30T02:08:29.124+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='laptop'/><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='logging'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='computer-science'/><title type='text'>Computer hardware test/analysis tools</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Today I happen to look into the causes for over-heating of my Dell Studio 14 (1458) laptop (i7, 720QM, 4GB RAM, Win 7 with ATI Mobility Radeon&amp;nbsp; HD 5450 - 1GB) and came across these various tools which people use to test/analyze their hardware.&lt;br /&gt;&lt;br /&gt;ThrottleStop&lt;br /&gt;CPUmark&lt;br /&gt;CPU RightMark&lt;br /&gt;Furmark&lt;br /&gt;ORTHOS&lt;br /&gt;HWMonitor&lt;br /&gt;RMClock - Undervolt processor. &lt;br /&gt;GPU-Z&lt;br /&gt;&lt;br /&gt;I am yet to use any of these, but I do hope to run them soon and post some results here, JFK. :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-6174360877971350258?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/6174360877971350258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2011/10/computer-hardware-testanalysis-tools.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6174360877971350258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6174360877971350258'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2011/10/computer-hardware-testanalysis-tools.html' title='Computer hardware test/analysis tools'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-4896547138808376937</id><published>2011-10-15T22:30:00.000+05:30</published><updated>2011-10-17T00:19:46.029+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ml-class'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='machine-learning'/><category scheme='http://www.blogger.com/atom/ns#' term='computer-science'/><title type='text'>Machine Learning online course - Class 1</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;As I mentioned in my &lt;a href="http://techbrahmana.blogspot.com/2011/10/starting-with-stanford-online-machine.html"&gt;previous blog post&lt;/a&gt; I am going to use this blog as my course notebook. All posts related to this course will have a "ml-class" tag, just in case. &lt;br /&gt;&lt;br /&gt;The first class was all introduction stuff, as expected. What I really liked about this class was the real world examples used. They were very useful in understanding what to expect from this course. Anyways, here are my notes for the class :&lt;br /&gt;&lt;br /&gt;Initially there were formal definitions of Machine Learning, one of them with rhyming phrases. I think we can skip those parts.&lt;br /&gt;&lt;br /&gt;There are two types of learning algorithms - Supervised and Unsupervised&lt;br /&gt;&lt;br /&gt;1) Supervised - A bunch of right answers are already provided to the machine. The machine has to try and get more of those right answers for the next set of questions.&lt;br /&gt;The data provided already has some sense of direction or some sort of inference. It is like a set of input and output values and we have to predict the output value for a new input value given based on the existing data. Here the resultant dimension is known and defined. We have to find a suitable function which when applied on the given set of input values will best match the corresponding output values. This same function will then be used to predict output values of new inputs.&lt;br /&gt;&amp;nbsp; - Eg : &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1) Predicting the price of the house of a particular size given the price of various houses of varying sizes.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2) Predicting whether a tumor is malignant or not based on the size given the answer for tumors of various sizes&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; Different Types&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1) Regression - Machine tries to predict a continuous valued attribute, i.e. the value of the attribute whose value we are trying to predict belongs to a continuous range. (The house price example)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2) Classification - Machine tries to predict a discrete valued output, i.e the range of values is a finite small set of discreet values. (The tumor example)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;2) Unsupervised learning - The data set given doesn't provide anything conclusive. It is just a data set and we are expected to make sense out of it and come up with the inference. There is no expected or target domain defined. It has to be inferred by examining the data. Very likely several target domains will be defined over the course of analyzing the data.&lt;br /&gt;&amp;nbsp; - Types :&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1) Clustering of data - &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -Eg : Google news example. Several articles about the same topic are grouped/clustered together. The input data set for this is just a bunch of articles (which is just one dimension/attribute). The other dimension (which is the common topic) itself is not well defined, i.e. the topics are not known before hand. We keep defining them as we go. So we have to infer that some of the articles belong to the same/similar topic and can be grouped together.&lt;br /&gt;&lt;br /&gt;That's it. Done with the first class. YAY.. !. I am yet to attempt the review exercises. I have decided to go for review exercises of this and the next class together.&lt;br /&gt;&lt;br /&gt;ಹರಿಃ ಓಂ.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-4896547138808376937?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/4896547138808376937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2011/10/machine-learning-online-course-class-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4896547138808376937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4896547138808376937'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2011/10/machine-learning-online-course-class-1.html' title='Machine Learning online course - Class 1'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-1177051670504264582</id><published>2011-10-14T22:30:00.000+05:30</published><updated>2011-10-16T23:51:24.728+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ml-class'/><category scheme='http://www.blogger.com/atom/ns#' term='e-learning'/><category scheme='http://www.blogger.com/atom/ns#' term='stanford'/><category scheme='http://www.blogger.com/atom/ns#' term='ml'/><category scheme='http://www.blogger.com/atom/ns#' term='machine-learning'/><category scheme='http://www.blogger.com/atom/ns#' term='computer-science'/><title type='text'>Starting with the Stanford online Machine Learning class</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Today I am starting with the &lt;a href="http://www.ml-class.org/course/auth/welcome"&gt;Stanford online Machine Learning classes&lt;/a&gt;, taught by Andrew Ng. This is my second attempt at learning machine learning, via the same medium, with the same professor and under the same program. This course has been available online since about 3 years, albeit the current one is much more polished and very meticulously designed for online learning, unlike the old ones which were just recordings of the actual classroom teaching. Two years ago (i.e. in 2009) I, along with some of my friends/colleagues (from different teams) decided to learn machine learning at our office. Quickly a team of interested folks was formed. There was a friend who had completed his post-graduation in US and he had studied and AFAIK also worked on machine learning stuff. Then there were two other friends who had completed their post-graduation from IISc. Then there was my boss, who also had done his post-graduate studies in US. Apart from these folks, there were some smart folks not keen on a post-grad degree. And finally there was me. Yeah. me too. :). The idea was that all of us would watch the video lectures and one of us would present a session weekly.&lt;br /&gt;&lt;br /&gt;We started with a bang, with an initial class on basics of statistics and probability, taught by that experienced and well-learned friend of mine. He called it "Statistics 101". It was good. There was no video lecture for this. So it was useful for me as my math needed a lot of dusting. This was followed by the first video lecture, which I believe had introduction to ML in general and also introduced the Linear Regression with one variable. It was taught/presented by another friend who had finished his post-graduation from the prestigious IISc. It went well too. (A side note : This friend seemed to have picked up the teaching traits/style of his IISc professors and I was getting the feeling of actually attending a class in IISc). More importantly most of us had watched this video and read the lecture notes once, before hand. All in all, the plan was on track. Till now.&lt;br /&gt;&lt;br /&gt;But then it all fell apart from the subsequent week. The meeting time clashed with another actual work related meeting for some. An upcoming release caused a couple of us to give this a skip. Then after two missed meetings, the interest had pretty much waned away and the ever increasing work load did not help anyone. After postponing the meeting many times and several declined responses for the calendar invite, the "Statistics 101" friend, who had setup the meeting, removed it entirely from the calendar and Machine Learning studies ceased to exist officially too.&lt;br /&gt;&lt;br /&gt;Now, a couple of months ago when I found out about the ML class being offered again, in an entirely new package tailor made for online learning, I decided that this time I would take it seriously and learn ML for real. I signed up immediately, not just for ML, but also for the DB and AI classes that are also being offered simultaneously, that too for the "Advanced Track" in all of those (which now looks like a bad move. I don't think I will be able to take up the AI class). Although classes officially started on Sunday/Monday, I could not get to until today. I just kept postponing it. Thanks to the review questions deadline, it came to now or never situation and I finally took the bold step of starting with the ML and DB classes. Luckily DB class doesn't have any assignments due on 16th Oct. So I just watched the introductory video. Then I started with the ML video lectures, which I am going through right now. I hope to keep up with the course schedule and get to all assignments on time, although they allow two delayed submissions. More importantly, I hope to learn something that I can use at my work right away, because I know there is scope for that at work.&lt;br /&gt;&lt;br /&gt;I intend to continuously blog, as I go through the course. This will sort act like my notebook and also keep my blog alive and updated and also have some meaningful content. :)&lt;br /&gt;&lt;br /&gt;Good luck to myself. .. !&lt;br /&gt;Hari: Om.&lt;br /&gt;ಹರಿಃ ಓಂ.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-1177051670504264582?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/1177051670504264582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2011/10/starting-with-stanford-online-machine.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1177051670504264582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1177051670504264582'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2011/10/starting-with-stanford-online-machine.html' title='Starting with the Stanford online Machine Learning class'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-3490102924513312310</id><published>2011-10-08T17:24:00.001+05:30</published><updated>2011-10-08T17:26:07.064+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>"List all Tabs" in Firefox 7 has different backgrounds for onscreen and off-screen tabs</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;A few days ago, my Firefox automatically updated to version 7.0.1 and ever since it's one new feature (which hasn't been advertised as a feature at all) has been bugging me; because I was not able to understand what it does.!. The feature in question is the different background color for some tabs in the "List All Tabs" menu - The menu that you get when you click the small (almost inconspicuous) inverted triangle between the "New Tab" (+) and the "Window minimize" (-) buttons.&lt;br /&gt;&lt;br /&gt;The first time I saw the differential background I thought it was like the read and unread tabs, like one of the tab management add-ons does. But no. No matter how many times I read the page in a tab, it's background color did not change.&lt;br /&gt;&lt;br /&gt;The next thought was that it corresponded to background tabs which are lazily loaded, i.e. the page is not actually loaded from the internet until you bring that tab to focus. But no, it was not even this. Even after several visits some tabs stayed with dark background.&lt;br /&gt;&lt;br /&gt;No amount of searching on the internet helped at that time and I had to calm myself down and let go off the quest for this eternal answer. Finally today I gave it another shot with some variations in search strings and I landed on &lt;a href="http://www.mozilla.org/en-US/firefox/7.0/releasenotes/buglist.html"&gt;this page which lists all the changes in version 7.0&lt;/a&gt;. Here I started searching for any bug related to tabs and finally got &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=626903"&gt;the right bug&lt;/a&gt;. This bug states the purpose of differential background color in the tabs list.&lt;br /&gt;&lt;br /&gt;As the bug states, the dark colored (highlighted) tabs are the ones which are currently displayed on the screen in the tab bar and the light colored ones are scrolled off the screen (horizontally). The rationale is that, this will make it very easy to figure out where a particular tab that you are looking for is, in case you are confused about it's position.&lt;br /&gt;I am yet to see the feature being actually useful. Nevertheless, for the moment I am happy that I know what the feature does. :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-3490102924513312310?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/3490102924513312310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2011/10/list-all-tabs-in-firefox-7-has.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/3490102924513312310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/3490102924513312310'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2011/10/list-all-tabs-in-firefox-7-has.html' title='&quot;List all Tabs&quot; in Firefox 7 has different backgrounds for onscreen and off-screen tabs'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-6696862874833678386</id><published>2011-10-03T08:55:00.000+05:30</published><updated>2011-10-03T08:55:45.239+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>Watch points for variables in Ruby - Object#freeze</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Almost every programmer knows about watch points. Especially the ones doing native development with C/C++. Watch points were really helpful to me when I was working with C/C++. They were, sort of, my go to weapons whenever I wanted to understand how some third party code worked. It was something that I dearly missed when I started with Ruby. I am fairly new to Ruby and I have never used the ruby-debug (or ruby-debug19) gem, because until today simple print statements were sufficient most of the times.&lt;br /&gt;&lt;br /&gt;Today I was at a loss as I was unable to figure out where a particular hash variable was getting two new key-value pairs in it. It was an instance variable with just an attr_reader defined. So obviously a reference to the instance variable was being passed around to the place where it was being modified. So my initial idea of writing a custom write accessor method was probably not going to work (did not try it). That is when I came across this &lt;a href="http://ruby-doc.org/docs/ProgrammingRuby/html/trouble.html#S3"&gt;http://ruby-doc.org/docs/ProgrammingRuby/html/trouble.html#S3&lt;/a&gt;. The last bullet point in that section has the answer.&lt;br /&gt;&lt;br /&gt;You just freeze the object/variable that you want to watch by calling the "freeze" instance method on that object and anyone modifying that object after it's frozen will cause an exception to be raised giving you the precise location of where that modification is happening. This isn't probably as elegant as running a debugger and setting a watch point but it gets the work done nevertheless. &lt;a href="http://techbrahmana.blogspot.com/2007/05/using-irc-one-place-for-answers-to-all.html"&gt;RTFM&lt;/a&gt; after all..!! This tool is definitely going into my belt. :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-6696862874833678386?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/6696862874833678386/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2011/10/watch-points-for-variables-in-ruby.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6696862874833678386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6696862874833678386'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2011/10/watch-points-for-variables-in-ruby.html' title='Watch points for variables in Ruby - Object#freeze'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-8989302218671409452</id><published>2010-12-13T02:39:00.008+05:30</published><updated>2010-12-13T05:28:53.029+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='vcf'/><category scheme='http://www.blogger.com/atom/ns#' term='csv'/><category scheme='http://www.blogger.com/atom/ns#' term='JS'/><category scheme='http://www.blogger.com/atom/ns#' term='NBF'/><category scheme='http://www.blogger.com/atom/ns#' term='nokia'/><category scheme='http://www.blogger.com/atom/ns#' term='node'/><category scheme='http://www.blogger.com/atom/ns#' term='contacts'/><category scheme='http://www.blogger.com/atom/ns#' term='backup'/><category scheme='http://www.blogger.com/atom/ns#' term='nodejs'/><title type='text'>Backup contacts from Nokia phone to a excel spreadsheet -- Convert VCF to CSV with nodejs.!</title><content type='html'>Yesterday my uncle asked me to take a backup of his cellphone contacts. He has a Nokia 3600 Slide phone. Now this phone is a piece of work.. ! It doesn't provide a way to copy/move contacts to the external memory card. I found a couple of file manager applications in .jar and .jad formats and tried to see if they show me the phone's memory (not the external memory card, but the memory embedded in the phone) as that is where the contacts are stored. But no luck. Later when I found one such application, whose description said it gives you access to contacts, it was a .sis file and phone simply said "File format not supported"... !! . It's a S40 phone and hence cannot install applications from .sis files and most of the cool and usable stuff seem to be available in .sis format only. :(&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A little searching led me to Nokia Europe support website page for "Backing up your phone" and the preferred  method for backing up contacts was copying to a computer via bluetooth (mentioned as the simpler solution) and backup via PC Suite (mentioned as the harder way). Sadly the simpler way was not possible for me as my current laptop (Lenovo G550) is bluetooth challenged (a.k.a no bluetooth module) and I did not have the CD that comes with the phone to install the PC Suite (I wouldn't have installed it even if I had the CD.. !!)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Some more searching led to me a few applications (free and paid, .sis and .jar/.jad formats) which would "sync" your phone to a "remote location" via GPRS and make it available to us globally and also (here comes the best part) via "Social Networking Websites".... (Geez... as if we love spam calls and SMS and we are short of them..!!).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Having found nothing really useful I started fiddling with the phone settings to see if I can find something there. Luckily there was the Backup option there. The default backup tool available in the phone can apparently dump your phone's current state --- including contacts, calender, settings, applications, etc.. etc.., all into a backup file (a .NBF file which I presume stands for Nokia Backup File/Format). Well thankfully this file is placed in the external memory card, in a folder named Backups. Then I connected my phone to my laptop and chose it to be used as an external storage device. Copied the .NBF to my computer. And I was happy that I could do it without any additional installation.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Sadly the happiness did not last long. I tried to open the NBF file in a few text editors (hoping to see a huge list of contacts) but was instead presented some gibberish.. Damn it... it's a binary file.. ! And I could not find any reader/converter for this file format on the internet. But thanks to the linux "file" utility, I got to know that NBF is just a zip archive. Fantastic... !! I unzipped it and found all my contacts in a folder at a depth of 4 (i.e. a folder in a folder.. 4 times). Again I did not see a huge list of contacts. I saw a huge list of VCF files, one each for every entry in my contacts. And this is how each file looked : (in case you are wondering why this file per entry is a problem)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;BEGIN:VCARD&lt;/div&gt;&lt;div&gt;VERSION:2.1&lt;/div&gt;&lt;div&gt;N;CHARSET=UTF-8;ENCODING=8BIT:&lt;contact-name&gt;&lt;/contact-name&gt;&lt;/div&gt;&lt;div&gt;TEL;PREF;WORK;VOICE;ENCODING=8BIT:&lt;number&gt;&lt;/number&gt;&lt;/div&gt;&lt;div&gt;END:VCARD&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Well clearly this is not really a usable form.. !!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, I thought I would just import all these VCF files into my contacts in Outlook and then export it as a CSV. That would be a pain in two ways -- First I need to setup my Outlook if it is not already setup, which was the case with me(a small pain). Secondly if Outlook is already setup then the two sets of contacts will be merged. Not something that my uncle wants. So the next idea was to convert all these VCF files into one CSV.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then the hunt started for VCF to CSV converter. I found a couple of online ones, but was apprehensive to upload the files to a remote server. I also had the option of downloading those server side scripts and run them in a webserver locally or with a PHP engine from the command line. I did not have PHP installed and did not think it was worth the effort as I wasn't sure how well those scripts worked. Finally I found this python script - &lt;a href="http://code.google.com/p/vcf-to-csv-converter/"&gt;http://code.google.com/p/vcf-to-csv-converter/&lt;/a&gt; . Happily I fired up my Linux VM and ran the script with nearly 1000 VCF files got from the phone. Bang.. !!! The script erred out with an exception while processing some 332nd file. :(&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;At this point it appeared to me that the easiest way out was to write a simple importer myself. I was in no mood to write a C/C++ program and do all that string manipulation with raw character buffers and pointers. And the only scripting language that I know well (well enough to write something useful on my own from scratch) was Javascript... !! So how do I process these VCF files with Javascript? &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enter, &lt;a href="http://nodejs.org/"&gt;Nodejs&lt;/a&gt;. I had been fiddling around with node for some time now but had not done anything useful with it. So I fired up vim and started to write the importer script and in about 30 mins (much less than the time spent on the internet searching for an existing tool... !) I had the contacts list in a CSV..!!  Wohooo... And here is the script which did the job : &lt;a href="https://gist.github.com/738325"&gt;https://gist.github.com/738325&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The script is very crude, to the extent that I have hardcoded the path of the output file and it's very likely not efficient either. Also note that this script just extracts Name and Phone numbers and no other details. It is a not a generic VCF parser ( I don't even know the VCF spec. I just looked at a couple of VCF fies and figured the format of lines for name and numbers). If anyone needs it, they are free to use it. No guarantees though.. !! :) &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It was a fun playing with JS, specially NodeJS. :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-8989302218671409452?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/8989302218671409452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2010/12/backup-contacts-from-nokia-phone-to.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8989302218671409452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8989302218671409452'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2010/12/backup-contacts-from-nokia-phone-to.html' title='Backup contacts from Nokia phone to a excel spreadsheet -- Convert VCF to CSV with nodejs.!'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-6835826494449284412</id><published>2010-10-15T21:30:00.000+05:30</published><updated>2011-10-17T01:10:41.046+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='node'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='nodejs'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Where does node.js figure in the typical web application stack?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I have been reading up about node.js for a little while now. Now having Javascript as one of my favorite languages I obviously love node.js. It's simply awesome. But it was not until very recently that I started to wonder where would this node.js fit in the typical three-tier web architecture, fondly know as "the stack". The three elements of the stack being Web server, app server and DB (DB is definitely out of question). Within the app server we typically have a language interpreter and a framework (like rails).&lt;br /&gt;&lt;br /&gt;I initially thought of node.js as a JS interpreter (similar to the ruby interpreter) and can be used with FCGI. But then again node.js in turn uses the V8 JS engine. So it's not a language interpreter per say. Then I saw several node.js examples showing how easily web based applications can be created. So I started comparing it with other frameworks like Rails or Erlyweb. But no, its not that either. Sure there is a simple HTTP module in node.js but it's in no way anywhere close to these frameworks. So is it a web server then? Definitely not that either, considering the rich feature list of existing web servers like Apache or Nginx. So what is this node.js then?&lt;br /&gt;&lt;br /&gt;From what I have understood till now, node.js is just a JS library (not like jQuery or Prototype which are meant to run in the browser context). node.js is more like a ECMA-Script library. If we treat JS as a generic programming language, I believe, we will see quite a few shortcomings, the most significant one being the lack of system i/o facility. I guess ECMAScript was designed to be run in a host environment and hence features like console i/o or file i/o or network i/o were not added. This makes it very hard for JS to be used outside the host environment. This is exactly what node.js provides.&lt;br /&gt;&lt;br /&gt;node.js extends the ECMA script and provides these missing aspects which enable JS to be used on the server side for network programming. node.js provides file i/o, socket i/o, process handling, a mechanism for creating modules and specifying dependencies, several network oriented modules and so on. (The complete list is &lt;a href="http://nodejs.org/api.html"&gt;here&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;So node.js is really a library, which adds capabilities, although these features are somewhat at a more basic level than the ones provided other libraries. For instance, look at the libxml library in C. The C language compilers come with their own standard library which provides mechanisms to do file i/o. But there is no out of the box provision to deal with XML files/documents. This capability is provided by the libxml library. So the libxml library allows programmers to do something more with C than what is provided by default. There are innumerable number of such libraries which add various types of capabilities.&lt;br /&gt;&lt;br /&gt;In somewhat analogous way, node.js is also a library which adds a lot of new capabilities to the Javascript language, although, as stated earlier, these capabilities are much more basic in nature and in most cases are present in other languages as part of their standard offering.&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;So node.js is not a new language and hence do not compare it with other languages like Ruby, Python, etc. Javascript is the language here.&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;node.js is not a new web application framework. So do not compare it with Rails, Django, Sinatra etc. albeit, note that node.js was apparently developed as a means to write high performance client server programs. Consequently smart folks out there started working on web application frameworks based on node and there are a couple. I know about "Express" which AFAIK, is based on Sinatra and is gaining popularity. Now that is an item comparable to Rails and friends. Questions like will node.js replace rails are, technically speaking, absurd.&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;node.js is not a server. Absolutely not. There are node.js based servers, just like Nginx and Apache are C based servers.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-6835826494449284412?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/6835826494449284412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2010/10/where-does-nodejs-figure-in-typical-web.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6835826494449284412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6835826494449284412'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2010/10/where-does-nodejs-figure-in-typical-web.html' title='Where does node.js figure in the typical web application stack?'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-2841541834951014885</id><published>2010-10-12T02:15:00.004+05:30</published><updated>2010-10-12T02:40:15.081+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='openssl'/><category scheme='http://www.blogger.com/atom/ns#' term='build-systems'/><title type='text'>Building Ruby 1.9.2 and installing rails 3.0 on it -- On Ubuntu 10.04  - Lucid Lynx</title><content type='html'>Issues that I faced while building Ruby 1.9.2 and then installing Rails 3.0 and finally making the example in &lt;a href="http://guides.rubyonrails.org/getting_started.html"&gt;"Getting started with Rails guide"&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Make sure the following development libraries are installed before you start building ruby:&lt;br /&gt;(The ruby configure, make and make install (i.e. building and installing)  will not tell you anything about these missing libraries)&lt;br /&gt;&lt;br /&gt;1) zlib-dev (I think the package name is zlib1g-dev) -- Needed when you try to install the rails gem. If this is not available you will get the following error when you try to install rails with the command :&lt;br /&gt;&lt;blockquote&gt;gem install rails&lt;br /&gt;&lt;br /&gt;ERROR:  Loading command: install (LoadError)     no such file to load -- zlib&lt;br /&gt;&lt;/blockquote&gt;2) libssl-dev -- Needed when you try to run the inbuilt rails WEBrick server and load the first example app in the getting started guide. You will get an error of the type:&lt;br /&gt;&lt;blockquote&gt;"LoadError: no such file to load -- openssl"&lt;/blockquote&gt;In my case I did not have this library the first time I built ruby. So I followed the instructions given &lt;a href="http://www.ruby-forum.com/topic/90083#175543"&gt;here&lt;/a&gt; to build the openssl-ruby module/binding.&lt;br /&gt;After this I ran `make`  and `make install` from the top ruby source directory. May be that was not necessary, but I did it anyways.&lt;br /&gt;&lt;br /&gt;Also, I am guessing that if this package was available when I first built ruby then the openssl-ruby module would be built by default. If not there should be a configure option to enable this `feature`. The configure's help output does not provide any info on this (not even the --help=recursive option).&lt;br /&gt;&lt;br /&gt;==== Upgrading from older ruby versions ====&lt;br /&gt;&lt;br /&gt;Older ruby versions used the folder /usr/local/lib/ruby/site_ruby/&lt;version&gt;/rubygems . Now apparently this directory is replaced by /usr/local/lib/ruby/&lt;version&gt;/rubygems .&lt;br /&gt;&lt;br /&gt;So you will have to get rid of the site_ruby folder (i.e. delete it) so that the gems are not searched for and used from a stale folder.&lt;br /&gt;&lt;br /&gt;Not doing this might result in you not being able to run gem at all.&lt;/version&gt;&lt;/version&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-2841541834951014885?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/2841541834951014885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2010/10/building-ruby-192-and-installing-rails.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2841541834951014885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2841541834951014885'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2010/10/building-ruby-192-and-installing-rails.html' title='Building Ruby 1.9.2 and installing rails 3.0 on it -- On Ubuntu 10.04  - Lucid Lynx'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-4245614876704606957</id><published>2010-06-26T01:51:00.003+05:30</published><updated>2010-06-27T02:45:27.317+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='gyaan'/><category scheme='http://www.blogger.com/atom/ns#' term='Networks'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>What is Cloud? -- Simple terms please</title><content type='html'>Cloud has been making a lot of noise and almost every tech (or tech related) person knows about it or at least heard of it. Now for those who have just heard about it but do not know what it means here is a quick definition from Dave Neilsen, the founder of &lt;a href="http://www.cloudcamp.org/"&gt;Cloud-Camp&lt;/a&gt;. He says,  "For something to be called cloud, it should have these properties :&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Hosted by someone else&lt;/li&gt;&lt;li&gt;On-demand. Do not have to wait or call somebody to get it.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Metered somehow. So you know exactly how much you are using and how much you are paying.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Scalable, both ways - up and down as and when you require."&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;He goes on to say that Cloud could mean different things for different people. Here area few examples stating what cloud is for a particular person :&lt;br /&gt;&lt;br /&gt;For an IT guy --  Infrastructure as Service&lt;br /&gt;For a  Web Developer -- Platform. Just dump your code and don't worry what runs it.&lt;br /&gt;For a Business guy -- SaaS (Software as a Service)&lt;br /&gt;&lt;br /&gt;That was pretty neat. Helps me answer the standard question "What the hell is this cloud thing?" in a sane manner. Earlier I could never figure out what a proper answer should be for this question, because there was so much to tell.&lt;br /&gt;&lt;br /&gt;Here is my attempt to elaborate on above mentioned examples.&lt;br /&gt;&lt;br /&gt;So cloud is basically having the infrastructure to do what you do hosted by someone else and having it totally scalable. For example, in the above list, for a web developer cloud is a platform where he can dump his code and expect it to run as he has designed it. He does not worry about the machines, the network connectivity, the bandwidth. He just pays for those in a metered manner. He scales his platform whenever he wants. He can increase his bandwidth quota, move to a better machine, increase the number of machines and all of this without calling the customer care or the sales guy. He will do it by logging into the cloud services website or he would have a script do this for him automatically, i.e if he is geek enough.&lt;br /&gt;&lt;br /&gt;Similarly for a business man, it is software as a service. E-mail service would probably be a good example. The business man does not know what software runs the email system, he does not worry about what version of email server is running, what os it is running on, what DB it is using to store the emails, what protocols it is making use of. If the email contents are not that sensitive he would not even worry about the physical location of the servers storing these emails. He just buys the email software as a service and uses it. All that he probably worries about is how many email accounts are available to him/his company and how reliable/usable they are. At any point he can increase or decrease the number of accounts, once again without making a call.&lt;br /&gt;&lt;br /&gt;That's cloud .&lt;br /&gt;&lt;br /&gt;Note : I got this definition from one of the IBM developerWorks podcasts which is available &lt;a href="http://www.ibm.com/developerworks/podcast/twodw/feature061510-nielsen-tidwell.mp3?ca=dnw-1125&amp;amp;ca=dth-cloud"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Oh, and remember, all this time every reference to Cloud meant "Cloud Computing", not just plain "cloud"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-4245614876704606957?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/4245614876704606957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2010/06/what-is-cloud-simple-terms-please.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4245614876704606957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4245614876704606957'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2010/06/what-is-cloud-simple-terms-please.html' title='What is Cloud? -- Simple terms please'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-8357613259776876508</id><published>2010-06-07T14:27:00.001+05:30</published><updated>2010-06-07T14:27:13.390+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='gnu-screen'/><category scheme='http://www.blogger.com/atom/ns#' term='gnome'/><title type='text'>Very high startup time for vim under screen (GNU-Screen) -- SESSION_MANAGER</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I have been using GNU-Screen for a while now and it has been very useful. Today morning when I started working, I noticed that vim is taking unusually long time to start up. It was very irritating. I had faced this same issue some time back but I could not recall the solution. I just remembered that it had something to do with GNOME and the display settings. On searching I found a couple of posts which said that this is because of vim trying to connect to an X which either is on a distant machine (distant in terms of network delay) or it is trying to connect to an non-existent X server. Another post on Ubuntu forums suggested that this could be because of multiple entries for 127.0.0.1 in the /etc/hosts file. Various combination of commenting/un-commenting entries did not help. I checked the DISPLAY env variable. It looked good too.&lt;br/&gt;&lt;br/&gt;Finally I resorted to the last option of using strace. strace did reveal interesting stuff. I saw the that the wait/delay was because of a connect() call. Here are a few lines from strace output : &lt;br/&gt;&lt;br/&gt;&lt;font face='Courier New'&gt;:~$ cat strace.vim.out | grep connect&lt;br/&gt;connect(3, {sa_family=AF_FILE, path="/tmp/.ICE-unix/6386"}, 21) = -1 ENOENT (No such file or directory)&lt;br/&gt;connect(3, {sa_family=AF_FILE, path="/tmp/.ICE-unix/6386"}, 21) = -1 ENOENT (No such file or directory)&lt;br/&gt;connect(3, {sa_family=AF_FILE, path="/tmp/.ICE-unix/6386"}, 21) = -1 ENOENT (No such file or directory)&lt;br/&gt;connect(3, {sa_family=AF_FILE, path="/tmp/.ICE-unix/6386"}, 21) = -1 ENOENT (No such file or directory)&lt;br/&gt;connect(3, {sa_family=AF_FILE, path="/tmp/.ICE-unix/6386"}, 21) = -1 ENOENT (No such file or directory)&lt;br/&gt;connect(3, {sa_family=AF_FILE, path="/tmp/.ICE-unix/6386"}, 21) = -1 ENOENT (No such file or directory)&lt;br/&gt;connect(3, {sa_family=AF_FILE, path="/tmp/.X11-unix/X0"}, 110) = 0&lt;br/&gt;connect(3, {sa_family=AF_FILE, path="/tmp/.X11-unix/X0"}, 110) = 0&lt;br/&gt;connect(3, {sa_family=AF_FILE, path="/tmp/.X11-unix/X0"}, 110) = 0&lt;br/&gt;connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)&lt;br/&gt;connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)&lt;br/&gt;connect(4, {sa_family=AF_FILE, path="/var/centrifydc/daemon2"}, 25) = 0&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;This confirmed the fact that it was a network related thing, i.e vim is trying to connect to something that did not exist. I thought my X (or GDM to be more precise) was screwed up and thought of logging out and logging back in. I thought of doing some more experiments with this setup to find out what caused the problem.&lt;br/&gt;&lt;br/&gt;All of this was running under my gnu-screen session. I opened another gnome terminal to read the redirected output of strace. Accidentally I used vim itself to open the file. Before I realized my mistake and I could start cursing myself, vim popped up..! It was there up and running as fast as it could be... !! Then it hit me that it could be my screen session which is causing this. I did not know how to find the differences in the two environments - in and out of screen. To solve this particular problem I ran strace on vim in the new terminal so that I could compare the two and find out what is lacking. Here is what strace told me in the terminal outside screen : &lt;br/&gt;&lt;br/&gt;&lt;font face='Courier New'&gt;:~$ cat outside.strace.vim.out | grep connect&lt;br/&gt;connect(3, {sa_family=AF_FILE, path="/tmp/.ICE-unix/28919"}, 22) = 0&lt;br/&gt;connect(4, {sa_family=AF_FILE, path="/tmp/.X11-unix/X0"}, 110) = 0&lt;br/&gt;connect(5, {sa_family=AF_FILE, path="/tmp/.X11-unix/X0"}, 110) = 0&lt;br/&gt;connect(6, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)&lt;br/&gt;connect(6, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)&lt;br/&gt;connect(6, {sa_family=AF_FILE, path="/var/centrifydc/daemon2"}, 25) = 0&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;The difference in the path was obvious. On searching through the list of environment variables SESSION_MANAGER came up. It is the variable which will tell all gnome based apps how to contact the X (or the GNOME session). I do not know what caused this disparity, but most likely setting the appropriate value inside the screen session would have worked. Well it would have worked in one of the screen windows in which I change the value. I have several such windows, so I just chose to start a new screen session.&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=11d7066c-d8dc-8958-94ef-75007ddcfdbe' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-8357613259776876508?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/8357613259776876508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2010/06/very-high-startup-time-for-vim-under.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8357613259776876508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8357613259776876508'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2010/06/very-high-startup-time-for-vim-under.html' title='Very high startup time for vim under screen (GNU-Screen) -- SESSION_MANAGER'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-5523209933606214248</id><published>2010-03-30T22:03:00.001+05:30</published><updated>2010-03-30T22:40:10.711+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JS'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='education'/><category scheme='http://www.blogger.com/atom/ns#' term='code performace'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><category scheme='http://www.blogger.com/atom/ns#' term='build-systems'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Mozilla @ SJCE : Static Analysis projects</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;It has been a very long time since I posted anything about the Mozilla related activities going on at my college SJCE, Mysore. That in no way means absence of any activity. In a &lt;a href='http://techbrahmana.blogspot.com/2009/11/mozilla-sjce-contributing-to-mozilla.html' target='_blank'&gt;previous post&lt;/a&gt; I mentioned that along with the attempt to introduce Mozilla as a standard course I was working to get the current final year students (who are enrolled under the larger VTU University) to start working on Mozilla, using their final semester project as a means. Well I am happy to say that this has materialized. 8 final semester students from CS expressed interest in working with the Mozilla community as part of their final year project and it's been a month nearly since they started their work. Here is a brief write up about that.&lt;br/&gt;&lt;br/&gt;As is with most of the Computer Science students in India approaching the Mozilla community, these 8 students also wanted to do something related to compilers. The JS engine and static analysis are two projects in Mozilla which would come under the compiler banner. These 8 students wanted to work on something substantial which can be presented by two teams of 4 students each as their final semester project. So the bugs that they would be working on had to be related. This was possible only with static analysis as there are a lot of related tasks available. Also static analysis would be something new to the students and it would give them an opportunity to understand the internals of the compiler (GCC here) like the AST (Abstract Syntax Tree) and other representations of the code. Moreover the static analysis APIs are exposed in JS and hence the analysis scripts would be written in JS. That way students would learn JS also. Above all these students would be doing something genuinely new.&lt;br/&gt;&lt;br/&gt;The students could not be asked to start working on the bugs directly. They were new to open source development, the tools used there like the bugzilla, using email as a formal medium of communication, the source control system (to add to the complexity Mozilla now uses a distributed RCS - Mercurial [hg]), using IRC, the linux development environment etc. It has been these things that the students have been learning for this part month or so. This learning has been in the form of accomplishing the tasks which form the prerequisites for the actual static analysis work. These are things like downloading gcc and mozilla sources from the ftp hosts and from the mercurial repository respectively, applying the mozilla specific patches to gcc for plugin support etc, etc... These are all listed &lt;a href='https://developer.mozilla.org/En/Dehydra/Installing_Dehydra#Prerequisites' target='_blank'&gt;here&lt;/a&gt;. Note that some things like installing all the dependency packages for building these applications from sources, learning to use the linux command line itself and others are not on that page but were new to these students nonetheless.&lt;br/&gt;&lt;br/&gt;All the students have been putting in substantial effort and have picked up the traits of an open source hacker pretty soon. We have had a few IRC meetings and a lot of formal communications over emails. In parallel we were also working towards shortlisting 8 static analysis bugs. Based on the feasibility of the bug being completed by an amateur developer within a span of 2.5 months and based on the students' interest we finally decided on these 8 bugs : &lt;br/&gt;&lt;ol&gt;&lt;li&gt;&lt;font size='2'&gt;&lt;a href='https://bugzilla.mozilla.org/show_bug.cgi?id=525063'&gt;        &lt;b&gt;Bug 525063&lt;/b&gt;&lt;/a&gt; -             Analysis to produce an error on uninitialized class members&lt;br/&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size='2'&gt;&lt;a href='https://bugzilla.mozilla.org/show_bug.cgi?id=500874'&gt;        &lt;b&gt;Bug 500874&lt;/b&gt;&lt;/a&gt; -             Static analysis to find heap allocations that could be stack allocations&lt;br/&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size='2'&gt;&lt;a href='https://bugzilla.mozilla.org/show_bug.cgi?id=500866'&gt;        &lt;b&gt;Bug 500866&lt;/b&gt;&lt;/a&gt; -             Warn about base classes with non-virtual destructors&lt;br/&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size='2'&gt;&lt;a href='https://bugzilla.mozilla.org/show_bug.cgi?id=500864'&gt;        &lt;b&gt;Bug 500864&lt;/b&gt;&lt;/a&gt; -             Warn on passing large  objects by value&lt;br/&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size='2'&gt;&lt;a href='https://bugzilla.mozilla.org/show_bug.cgi?id=528206'&gt;        &lt;b&gt;Bug 528206&lt;/b&gt;&lt;/a&gt; -             Warn on unnecessary  float-&amp;gt;double conversion&lt;br/&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size='2'&gt;&lt;a href='https://bugzilla.mozilla.org/show_bug.cgi?id=526309'&gt;        &lt;b&gt;Bug 526309&lt;/b&gt;&lt;/a&gt; -             Basic check for memory leaks&lt;br/&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size='2'&gt;&lt;a href='https://bugzilla.mozilla.org/show_bug.cgi?id=542364'&gt;        &lt;b&gt;Bug 542364&lt;/b&gt;&lt;/a&gt; -             Create a static analysis  script for detecting reentrancy on a function&lt;br/&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size='2'&gt;&lt;a href='https://bugzilla.mozilla.org/show_bug.cgi?id=500875'&gt;        &lt;b&gt;Bug 500875&lt;/b&gt;&lt;/a&gt; -             Find literal  strings/arrays/data that should be const static&lt;br/&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;These tasks are good, challenging and provide an opportunity to understand compilers very closely.&lt;br/&gt;&lt;br/&gt;Currently the students have downloaded gcc, applied the patches, built it along with the dehydra plugin support and are ready to run static analysis on the mozilla code. They are now trying to run simple analysis scripts like listing all classes in mozilla code and all classes and their corresponding member functions. It is still quite a long way to go, but it has been a real good start. Let's wait and watch what great feats are in the pipeline.&lt;br/&gt;&lt;br/&gt;I hope to keep this blog updated at the same pace at which the students are working. &lt;br/&gt;&lt;br/&gt;Good luck to the students. :-)&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=fb91ee19-092c-8736-9393-e9c4bb7bd3fd' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-5523209933606214248?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/5523209933606214248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2010/03/mozilla-sjce-static-analysis-projects.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5523209933606214248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5523209933606214248'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2010/03/mozilla-sjce-static-analysis-projects.html' title='Mozilla @ SJCE : Static Analysis projects'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-1076328592038970849</id><published>2010-01-28T00:40:00.007+05:30</published><updated>2010-01-28T00:50:38.628+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JS'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='extensions'/><category scheme='http://www.blogger.com/atom/ns#' term='logging'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><title type='text'>Script to get nsIWebProgressListener state names from state codes</title><content type='html'>This is totally Mozilla specific and probably will not make any sense to anyone not involved with Mozilla code.&lt;br /&gt;&lt;br /&gt;So in Mozilla there is an interface named nsIWebProgressListener which can be used to get notifications about any web progress -- a page load in simple terms. So these notifications are sent to us by calling our onStateChange methods. One of the parameters passed is the state of the request. This is a hex code. Memorizing all the hex codes is insane. So to log the states I wrote a small, dumb, script.&lt;br /&gt;&lt;br /&gt;I wanted to put it somewhere on the internet, instead of a file on my disk, and hence this blog post. Here is the script to convert nsIWebProgressListener state hex codes to state names. A simple lookup function, but handy for logging&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var flagNames = [&lt;br /&gt;"STATE_START",&lt;br /&gt;"STATE_REDIRECTING",&lt;br /&gt;"STATE_TRANSFERRING",&lt;br /&gt;"STATE_NEGOTIATING",&lt;br /&gt;"STATE_STOP",&lt;br /&gt;"STATE_IS_REQUEST",&lt;br /&gt;"STATE_IS_DOCUMENT",&lt;br /&gt;"STATE_IS_NETWORK",&lt;br /&gt;"STATE_IS_WINDOW",&lt;br /&gt;"STATE_RESTORING"&lt;br /&gt;]&lt;br /&gt;&lt;br /&gt;var flagValues = [&lt;br /&gt;0x00000001,&lt;br /&gt;0x00000002,&lt;br /&gt;0x00000004,&lt;br /&gt;0x00000008,&lt;br /&gt;0x00000010,&lt;br /&gt;0x00010000,&lt;br /&gt;0x00020000,&lt;br /&gt;0x00040000,&lt;br /&gt;0x00080000,&lt;br /&gt;0x01000000&lt;br /&gt;]&lt;br /&gt;&lt;br /&gt;function splitFlags(aFlag) {&lt;br /&gt;var states = ""&lt;br /&gt;for(var i in flagValues)&lt;br /&gt;{&lt;br /&gt;if(aFlag &amp;amp; flagValues[i])&lt;br /&gt;{&lt;br /&gt;    states+= flagNames[i] + "\n";&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;return states;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;That's it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-1076328592038970849?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/1076328592038970849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2010/01/script-to-get-nsiwebprogresslistener.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1076328592038970849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1076328592038970849'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2010/01/script-to-get-nsiwebprogresslistener.html' title='Script to get nsIWebProgressListener state names from state codes'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-358906929307687446</id><published>2009-11-19T00:14:00.001+05:30</published><updated>2009-11-19T03:04:54.921+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='education'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><title type='text'>Mozilla @ SJCE -- Contributing to Mozilla informally - Final semester student projects</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Along with the attempt to introduce &lt;a href='http://techbrahmana.blogspot.com/2009/11/mozilla-sjce-modern-teaching-methods.html' target='_blank'&gt;Mozilla as a formal elective at SJCE&lt;/a&gt; I have been working on getting some development work started informally too. The current final year students are enrolled under the central university - &lt;a href='http://www.vtu.ac.in' target='_blank'&gt;VTU&lt;/a&gt; and hence cannot be offered any new subject. However they are expected to do a project as part of the course completion. I thought of using this to get students to do their final semester project with Mozilla. Also Mozilla labs organizes this program named Design Challenge where enthusiasts -- students, teachers, academicians, software developers, etc, are invited to submit innovative ideas to make the Firefox web browser a better software and the Internet in general a better place. This has received tremendous participation from the student community across the globe. The best part about this program is that this is not just a competition. The selected students are trained on various Mozilla related technologies by the very Mozilla developers who are developing those technologies. After such mentoring the students can start contributing code to Mozilla and products based on it. And not to mention the wealth of knowledge they stand to gain and how much of positive influence it will have with prospective employers or while applying for higher studies. This suited very well for the final year and also the pre-final year students.&lt;br/&gt;&lt;br/&gt;So when I visited my college last Saturday (14-Nov-2009) to meet my HoD and the coordinating lecturer, related to the Mozilla elective to be offered, I decided to talk to final and pre-final year students and motivate a few of them to participate in the upcoming design challenge (Nov - 09 to Mar - 10) and also take up Mozilla work for final year projects. I talked to the coordinating lecturer (Shri P M Shivamurthy) and asked to him make an announcement regarding this and have the students assembled in one of the classrooms or the seminar hall. After going to the college I got to know that the pre-final year (5th sem) students would not be available as they have their internal assessment tests starting from Monday. HoD suggested that I should stay back till Monday evening and address the 5th sem students on Monday after that day's tests. That was not possible for me and I decided to visit the college again on the next Saturday for that and I would talk to the final year (7th sem) students for now. As a result I decided to stick to the final year project only. Things were set up in the Network Lab and there were about 30 students. &lt;br/&gt;&lt;br/&gt;Standing in front of them I blabbered a bunch of things about Mozilla, Open Source software, how engineers graduating are not really industry ready and the fact that they do not have any experience on working with real world applications with huge code base and contributions from a large number of developers and finally how participating in Mozilla would help them fill that gap. I also told them the vast amount of options that Mozilla provides in terms of technologies and that they could find some work or the other which lies in their area of interest. At the end I asked if anyone had any questions and as expected nobody did. Then on asking how many would be willing to try something like this I saw something like 3 to 4 half-hands rising up in the air. This was certainly not a good sign. So I started with the "motivational" speech. "This will really help you guys to be ahead of students from other colleges. You will be industry ready where as other will require a lot more training and mentoring. This is all HoD pre-approved... and on and on and on" for a few more minutes. That really did the trick. After this I had about 10 - 12 hands, full ones. Quite satisfied I told them to get my contact details from PMS sir and contact me for any queries. Till now I have received emails from 6 students (one of them representing a project group of 4 students. so 9 students actually). I have sent them a couple of links to start reading. None of them have responded after that. But I am still hopeful.&lt;br/&gt;&lt;br/&gt;A little later I was talking to some of the students offline and I got to know some facts which would have been very useful to me in positioning this Mozilla project idea in a much stronger way.&lt;br/&gt;&lt;br/&gt;1) Campus recruitment is pretty bad this time. Only 6 students in Computer Science have got job offers, compared to a daily average of 20 - 25 students a couple of years back. --- I could have talked about how open source development experience will help them with jobs. It did help me.&lt;br/&gt;2) Project teams (generally of 3 to 4 students) have already been formed and a guide (a member of the faculty) has been assigned. This has two effects:&lt;br/&gt;    a) Some teams have already been given the project work, which is a small part of the guide's doctorate thesis/research. The guide will now not happily approve of students under him/her pursuing a difference project.  -- We could talk to HoD and reason out with the guide. I could have told the students that such a thing is very much possible.&lt;br/&gt;&lt;br/&gt;    b) In a project team of 4, generally one or two students are the smart ones and others will be banking on them for the project to be completed. I had told them that in Mozilla it is generally individual contribution or a team of 2 at the max. The teams, like those mentioned earlier, cannot be divided as the dependent folks will get into a problematic position. -- I could have told them that Mozilla does not bother if the work done by one student is present by 4 as a team work. So let the team enroll for a Mozilla project. Either all or a few in the team will work. If its all of them each one will have a bug assigned or the bug will be assigned to one guy with all of them working on it. If it is just one or two of them then there are no issues.&lt;br/&gt;&lt;br/&gt;    c) On a related not to the above two points, some students told me that they would like to do a Mozilla project in addition to an already assigned final semester project. This really delighted me. But it also was, sort of, a matter of concern, as it appeared to me that people were desperate to do something like this with the hope that it will add a line to their resume and help them get a job. I might be wrong and I wish and hope I am. Students doing open source development just out of pure interest and not part of any course requirements is the best thing. But let me see what it turns out to be.&lt;br/&gt;&lt;br/&gt;3) I did not make an announcement about the design challenge because the mentoring classes for that goes on from Dec-09 to Feb - 10 and these guys have their exams in the second  half of December. But I later got to know that no mentoring classes will be held from approximately 21st Dec to 4th Jan because of the holiday season in the US. So I talked to a smaller number guys, those who stayed back to talk to me, about the design challenge and am hoping to have 1 to 3 ideas being submitted.&lt;br/&gt;&lt;br/&gt;I am going to use these points during my next visit, this coming Saturday.&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=167602ef-b5ea-8e96-b407-9b61048d3805' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-358906929307687446?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/358906929307687446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/11/mozilla-sjce-contributing-to-mozilla.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/358906929307687446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/358906929307687446'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/11/mozilla-sjce-contributing-to-mozilla.html' title='Mozilla @ SJCE -- Contributing to Mozilla informally - Final semester student projects'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-7547811881772959530</id><published>2009-11-17T09:50:00.001+05:30</published><updated>2009-11-17T23:26:26.477+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='education'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><title type='text'>Mozilla @ SJCE -- Modern teaching methods are still a stigma and considered unreliable.</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;In my effort to get open source development into main stream academics at my engineering college SJCE, I have been working with the Mozilla Education team for some time now. With our college getting the autonomous status and also with great help from the MozEdu folks like Prof David Humphrey and Frank Hecker and after considerable persuasion (more about that in a different post) I could get an elective named "Learning Open Source Software with Mozilla" added to the curriculum of the 6th semester students. We (me and the members of the college faculty) decided to roll out this elective in the year of 2010. The next step for me, I thought, was to get at least one lecturer trained with the curriculum and in general get that lecturer involved with Mozilla development and practices. Also with Prof David making the videos of his lecture sessions available on the internet, freely for everyone's use, my plan was to give the lecturer a head start (w.r.t students) so that with the beginning of the next semester he could start teaching the students those parts which he has already learnt. In the mean time he himself can continue his learning by going through David's lecture sessions and other resources that would be available on the internet. I would be visiting the college on alternate weekends. I thought, may be I could take a couple of hours of classes on Saturday for both students and also the lecturer(s). I could have used my presence to answer the queries that the students and the lecturers had, or at least I could point them in the right direction. Apart from these fortnightly visits I planned to be in touch with the college folks continuously on the internet -- email, irc, skype, etc. I would be actively involved the first time this subject is taught. After that the lecturer would be considerably capable and also the subsequent batch of students would have their seniors to help them out. At that point the program will not greatly depend on me and will be sort of self-sufficient with people directly talking to the Mozilla developers and the community in general. As a bonus the students who studied this subject would get to carry out their final year project work with Mozilla, either in terms of some feature implementation or certain bug fixes or any such task. It appeared like a sound plan and I had even decided that we would try to get about 15 students for the first time and gradually increase the number.&lt;br/&gt;&lt;br/&gt;Last Saturday (14-Nov-2009) I went to meet the HoD and the lecturer who was coordinating this from the college side to get things started. The meeting was a big disappointment. Our HoD made it absolutely clear that the this elective will be offered only if 50% of the students (which translates to about 70 - 80 students) take up the elective. So the idea of first starting with a small number so that coordinating things on the internet will be easier and all that was just blown away. The reason for this is apparently because there are not enough class rooms to teach more than 2 groups of students from the same semester.!! It has to be a 50-50 division between two electives. So though there are 5 or 6 electives available to the students, they actually have to choose from just 2 of them, based on the majority and not interest. &lt;br/&gt;&lt;br/&gt;Well my plan was not killed completely, yet, as the ideas in it were sort of the perfect solution for "the lack of classrooms" problem. I put forth the rest of my idea saying the remote teaching and a lot of learning on an individual basis (by reading up the resources on the internet and interacting with the Mozilla devs) would virtually the necessity of a full blown class room teaching always. But the HoD flatly rejected this idea and said that he understood what I was suggesting but there are rules saying classes must be conducted for a fixed number of hours for any subject offered and it has to be the traditional way. Also the idea of training the lecturers in a, sort of, asynchronous manner was also not acceptable. He would want a training session to be conducted - typically a week to a month long session, may be with a certification at the end of the session. Moreover currently I have one lecturer ready to take this up but department mandates at least 2 or 3. Now I have an additional task of motivating at leat two more faculty members. For this I have to prepare a write up explaining what the lectures stand to learn/gain by taking up this new thing. After that if any of them express their interest in taking this up, I will have to train them and probably it has to be in the traditional way - not sure yet.&lt;br/&gt;&lt;br/&gt;Another problem is the pace. The next semester will be starting some time in Feb or Mar 2010 and my HoD keeps saying "Lets go slowly at first and see. If not in 2010 we will offer this in 2011" !!.. :-( . I hope we can get this thing started in 2010 itself. Another year of idle waiting might just terminate the interest that I currently have.&lt;br/&gt;&lt;br/&gt;All in all, the wall between open source and my college is appearing to be more and more thick. I intend to meet the HoD the coming Saturday again and try to convince him to give his approval for the "internet based learning" approach. Lets see how it works out.&lt;br/&gt;&lt;br/&gt;Apart from this I talked to a bunch of final year students about carrying out their final year project with Mozilla and also about participation the upcoming design challenge. More about that in another post.&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=9321d454-1c0b-8671-a419-40777c57e9f1' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-7547811881772959530?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/7547811881772959530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/11/mozilla-sjce-modern-teaching-methods.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/7547811881772959530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/7547811881772959530'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/11/mozilla-sjce-modern-teaching-methods.html' title='Mozilla @ SJCE -- Modern teaching methods are still a stigma and considered unreliable.'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-8881548991236027236</id><published>2009-11-04T09:27:00.001+05:30</published><updated>2009-11-04T09:27:56.917+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='extensions'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Mozilla Developer Network (MDN) survey -- My inputs</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I just finished the MDN survey and here is what I said in that last box which was put there for the people like us to pen down our rants. ;-)&lt;br/&gt;&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Project documentation needs improvement. It has improved and is improving, but a lot still needs to be done specifically about the oldest lines of code.&lt;/li&gt;&lt;li&gt;I hear from some of the core developers that there are lots of hacks which make the code not entirely predictable. These need to be removed and replaced by proper, reliable code. Again the cleaning is going on, am just saying that it is really important so that there is some sort of SLA based on which people can develop applications.&lt;/li&gt;&lt;li&gt;Consolidation of the content on MDC and MozEdu so that we can have a "The Mozilla Book", which any beginner can go through and dive into Mozilla related development -- either the platform or the browser or the add-ons or anything.&lt;/li&gt;&lt;li&gt;Finally, making various Mozilla components available in the form of easily pluggable library modules and step by step guides telling us how to use them.&lt;/li&gt;&lt;/ul&gt;&lt;br/&gt;I do not know if any of this is useful to anyone else in the community, but for me, these appeared to be very important based on my association with Moziila for about 2.5 years now.&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=df5bff41-d055-8654-942d-a556c83ed204' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-8881548991236027236?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/8881548991236027236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/11/mozilla-developer-network-mdn-survey-my.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8881548991236027236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8881548991236027236'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/11/mozilla-developer-network-mdn-survey-my.html' title='Mozilla Developer Network (MDN) survey -- My inputs'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-4596238734721552714</id><published>2009-10-28T15:59:00.010+05:30</published><updated>2009-10-28T19:32:59.710+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JS'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='xul'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='build-systems'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Incrementally building Mozilla/Firefox</title><content type='html'>&lt;div&gt;&lt;blockquote&gt;&lt;/blockquote&gt;Mozilla code base is really huge and has variety of files which are built in a variety of ways. It was sort of always confusing for me to figure out where all I should run make after I change any of the files. I generally asked on the IRC and someone just told me where to run make.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Today it was the same thing. But I also thought I would as well learn the logic to decide for myself the next time. Here is the chat transcript of NeilAway answering these questions.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The MDC page (&lt;a href="https://developer.mozilla.org/en/Incremental_Build"&gt;https://developer.mozilla.org/en/Incremental_Build&lt;/a&gt;) has almost the same content for the native code. Neil here explains it for all the types of files involved.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Also to add to the following things running : "make check" from the objdir will run the automated tests.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;For xul/js/css/xbl it usually suffices to find the jar.mn (it may be in an ancestor folder) and make realchrome in the corresponding objdir&lt;/li&gt;&lt;li&gt;For idl you're often looking at a full rebuild, depending on how widely it's used&lt;/li&gt;&lt;li&gt;For .cpp and .h you obviously have to make in the folder itself, and then look for a corresponding build folder&lt;/li&gt;&lt;li&gt;Except for uriloader where you use docshell/build and content, dom, editor and view use layout/build&lt;/li&gt;&lt;li&gt;If you're building libxul or static then this is all wrong&lt;/li&gt;&lt;li&gt;You don't look for a build folder, I think for libxul you build in toolkit/library and for static you build in browser/app&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-4596238734721552714?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/4596238734721552714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/10/incrementally-building-moizllafirefox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4596238734721552714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4596238734721552714'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/10/incrementally-building-moizllafirefox.html' title='Incrementally building Mozilla/Firefox'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-5583993535344636140</id><published>2009-10-27T12:26:00.001+05:30</published><updated>2009-10-27T12:26:25.613+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Changing the start up directory of command prompt -- The safe and simple way</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;By default, the command prompt window (cmd.exe) starts in a particular directory which depends on quite a few factors. Specifically, the env varibales %HOMEDIR% and %HOMEPATH% matter the most or these are the ones which ultimately decide the location. There are some registry values also, but they are not in the game by default. This leads to the command window to start up in something like C:\Documents and Settings\&amp;lt;username&amp;gt;\ which is not particularly useful as this location is rarely used for anything useful. It can get worse. In a corporate environment it might so happen, more often than not, that your home directory is set to a shared network drive using a group policy and the command prompt starts in that remove drive location.. ! The pain can be aggravated if you are on VPN or something similar.&lt;br/&gt;&lt;br/&gt;I personally feel that command prompt, which is mainly programmers tool, should not start in %HOMEDIR% as there are rarely (mostly never) any programming related files are kept. Anyways, there are many ways to solve this problem.&lt;br/&gt;&lt;br/&gt;The first of them and the most dangerous is fiddling with the registry. It is mentioned here : http://windowsxp.mvps.org/autoruncmd.htm&lt;br/&gt;The problem with this is that it will screw up make based build environments which spawn multiple child shells (aka command prompts), because the command prompt will start in this changed default location instead of the location where the make had to run.&lt;br/&gt;&lt;br/&gt;The next is fairly simple and also elegant. You can create a shortcut to the main exe (C:\Windows\system32\cmd.exe) and in the properties of the shortcut you can provide the directory to start in. This good for mouse users. However for those (most programmers) who start command prompt from the run dialog (by typing cmd) this will fail.&lt;br/&gt;&lt;br/&gt;The third solution is to deal with the previous solutions shortcoming. You can just create a batch fail in any of the locations where the run dialog looks into. I prefer C:\Windows\systme32\. Put the following line in the batch file: C:\Windows\system32\cmd.exe /K "cd &amp;lt;path-to-dir&amp;gt;" . Just replace the &amp;lt;path-to-dir&amp;gt; with the path where you want the command to start. I generally put it as C:\.&lt;br/&gt;This will start a command window and execute cd &amp;lt;path-to-folder&amp;gt; and will stay for further inputs. I have named this batch file as sh.bat (obviously to get a linux feel :P ). So now when I press the Windows + R key and type sh, I get the command prompt started in C:\.&lt;br/&gt;Done.&lt;br/&gt;And yes, this is totally safe and will not affect any other application using cmd.exe. :)&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=cb1125aa-c1b7-859c-91ae-27f9c7412102' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-5583993535344636140?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/5583993535344636140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/10/changing-start-up-directory-of-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5583993535344636140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5583993535344636140'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/10/changing-start-up-directory-of-command.html' title='Changing the start up directory of command prompt -- The safe and simple way'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-5762211838877753735</id><published>2009-10-06T02:23:00.001+05:30</published><updated>2009-10-06T02:23:12.280+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='openssl'/><category scheme='http://www.blogger.com/atom/ns#' term='Networks'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>OpenSSL base64 filter BIO needs an EOL and memory BIO needs to know about EOF</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I recently started working with the OpenSSL library to do some https stuff (sort of obviously). OpenSSL apart from having an implementation for the SSL encryption part, it also nifty algorithms for certificate handling and more importantly an abstract I/O layer implementation called BIO which probably stands for Basic I/O or Buffered I/O or something else. I do not know, I could not find it. Nevertheless, the items of interest here are the BIO_f_base64() -- The base64 encode/decode filter BIO and the BIO_s_mem() -- The memory BIO, which can hold data in a memory buffer.&lt;br/&gt;&lt;br/&gt;The BIO man page (or its online version present here: http://www.openssl.org/docs/crypto/bio.html) give a nice introduction. For now just consider BIOs as black boxes from which you can read or write data. If the BIO is a filter BIO then the data will be processed whenever you read or write to it.&lt;br/&gt;&lt;br/&gt;The name, BIO_f_base64, says it all about the functionality of this BIO. If you read from this BIO, then whatever data is being read is first base64 decoded and given to you. OTOH, if you write something to this BIO it will be base64 encoded and then written to the destination. These BIOs can be arranged in the form of chains to do a series of processing on the data that you are reading or writing, all by just a single call to read() or write(). Its all abstracted. Saves a lot of time.&lt;br/&gt;&lt;br/&gt;I was trying to decode some base64 encoded data which I had in a buffer, a char [] to be precise. So if you read up about the BIOs it becomes obvious that you first have to create a memory BIO, which will hold the actual encoded data. Write the encoded data to the memory BIO. Then you chain that memory BIO with a base64 BIO and read from that chain. Any data that you read from the chain will actually come from the memory BIO, but before it reaches you it passes through the base64 BIO. So essentially you are reading from the base64 BIO. As mentioned in the earlier paragraph, when you read from a base64 BIO it decodes the data and gives it you. So the base64 encoded data present in the memory BIO is decoded and presented to you. That's it. base64 decoding is done in one simple read() call !&lt;br/&gt;&lt;br/&gt;But there is small catch here. For some reason, which I have yet partially understood, base64 requires that the data it is handling be terminated with a new-line character always. If the data does have any newline character, meaning all your data is present in a single line then you have to explicitly tell that to the BIO by setting the appropriate flag. Here is what the man page says:&lt;br/&gt;&lt;br/&gt;&lt;blockquote&gt;The flag BIO_FLAGS_BASE64_NO_NL can be set with BIO_set_flags() to encode the data all on one line or expect the data to be all on one line.&lt;br/&gt;&lt;/blockquote&gt;&lt;br/&gt;That's about the base64's EOL. Now the other BIO involved here,the memory BIO, is also an interesting guy. When the data it has gets over, it doesn't say "Hey, its over, stop it!". Instead it says "Dude, you got to wait for some more data to arrive. Hang on and keep trying". !!! This is very much suitable, probably when you using the BIO like a PIPE, where you keep pumping data from one end by acquiring it from somewhere and some other guy consumes that data. But in a situation like mine where the data is all fixed I simply want it to tell that the data is all over and I need to stop it. To do this again I will have to explicitly set an appropriate flag and here is what the man page says:&lt;br/&gt;&lt;br/&gt;&lt;blockquote&gt;BIO_set_mem_eof_return() sets the behaviour of memory BIO b when it is empty. If the v is zero then an empty memory BIO will&lt;br/&gt;return EOF (that is it will return zero and BIO_should_retry(b) will be false. If v is non zero then it will return v when it&lt;br/&gt;is empty and it will set the read retry flag (that is BIO_read_retry(b) is true). To avoid ambiguity with a normal positive&lt;br/&gt;return value v should be set to a negative value, typically -1.&lt;br/&gt;&lt;/blockquote&gt;&lt;br/&gt;And this same thing is explained very well here: http://www.openssl.org/support/faq.html#PROG15.&lt;br/&gt;&lt;br/&gt;I thank Dr. Stephen N Herson of the OpenSSL project for helping me out in understanding this. Here is the mailing list posting that taught me this thing : http://groups.google.com/group/mailing.openssl.users/browse_thread/thread/f0fc310c1bc6ec65#&lt;br/&gt;&lt;br/&gt;Happy BIOing. :-)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=cf054569-32e8-8757-9c40-6de5ab598c11' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-5762211838877753735?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/5762211838877753735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/10/openssl-base64-filter-bio-needs-eol-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5762211838877753735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5762211838877753735'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/10/openssl-base64-filter-bio-needs-eol-and.html' title='OpenSSL base64 filter BIO needs an EOL and memory BIO needs to know about EOF'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-9023036196433783167</id><published>2009-08-31T00:37:00.000+05:30</published><updated>2010-10-15T04:00:13.472+05:30</updated><title type='text'>Should Indian farmer think of his family's hunger or the country's?</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;This is the type of condition the typical Indian farmer currently is in. When I say typical Indian farmer, I am referring to those lean hard working people who sweat out the whole day and yet just have a hand to mouth existence, that too if they are lucky. I do not have to substantiate the last part of my previous statement as the state of our farmer is well known. No matter how hard the farmer tries, how hard he struggles, the first person to gain from that is the middle-man, with whom the farmers are compelled to park their annual produce. The reason for that is another story in itself, probably some other time. Anyways, focusing on the topic of this post, let me try and tell you why I think farmers today are faced with this question.&lt;br/&gt;&lt;br/&gt;We all know Indian population is growing faster than any other thing in the country with an unbeatable consistency. This directly corresponds to heavily increased demand &amp;amp; consumption of food. Good news is that the country's agriculture is able to meet this rising demand pretty well, thanks to the technology. With improved variety of seeds and fertilizers, increased proliferation of irrigation, some education to farmers, better knowledge of weather behavior and so and so forth, the throughput per acre of land has increased, in almost every variety of cultivation. So the farmer now has more goods to sell every year and get more revenue. But sadly this is has not transformed into increased income to the farmer yet because of the ever increasing input costs. The seeds have improved, but they cost more, a lot more. The fertilizers are better, they reduce the time to grow, but they really push the farmer deep into the pit of debt. Its the same story with irrigation equipments, modern cultivation methodologies, etc.. (Government is trying various policies and subsidies, but still the costs are higher and have increased substantially). As a result the farmer is still poor and leads a hand to mouth existence. Not only that, he now has to invest a higher amount initially (which most farmes do by taking a loan from the middle-man) and hence is taking a bigger risk, because in case of a failed crop he has a much bigger debt to repay. The trade off / inequality / tragedy is clear here. The farmer is the one who is providing the country's ever increasing population with the food supply, by putting on more risk on himself and yet he earns the same as he has been earning. All that he can think of doing is to have proper meals for himself and his family, in other words - bare survival. If he starts thinking of proper education for his children, or a proper house in place of the generations old dilapidated building, he invariably has to go for a loan again. In such a situation it is but natural for the farmer to think that whether the extra risk that he is taking every year is really required? If we put ourselves in his position and think about the question the answer stands out clearly as NO. And fortunately or unfortunately this is what the Indian farmer is thinking now.&lt;br/&gt;&lt;br/&gt;He is thinking of securing his home first. He is not thinking about the national crisis it may cause and he can't be expected to think about that either. But the government has started to see this. It also has realized that if the farmer goes his way the country will soon be facing a huge food crisis and huge imports will be inevitable. I am not sure if imports is the right word here, it might as well become begging. With us (our country) in a such needy state all our policies will be influenced either by the one who will be lending us the food or the west (Europe and US) in general. That might bring a stop to the magnificent growth picture being painted everywhere in the country now. The government knows this all and it obviously can't let this happen because anything like this will instantaneously put them out of voters' favor. So the government has already started taking measures to counter this. Currently it is not very aggressive in its approaches. It is trying to convince the farmers to grow more and work towards increasing the yield instead of just thinking of survival. Though it does not appear plausible, we might just see a rule mandating a minimum yield/unit of land coming from the government. Or to be farmer friendly we might just see government going in for huge amounts of subsidies. I do not know how the government will handle this but I think the best way is to make arrangements for farmers to get a fair value for their produce, which means getting rid of middle-men. That is a very hard thing as every activity of the farmer is linked to the middle-man and hence there has to be an alternate system in place to replace the middle-men. Lets hope that the government will think of something that will feed both the country and the farmer well and equally.&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=7bab3f17-66f1-8c36-b366-2839ce415b3b' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-9023036196433783167?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/9023036196433783167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/08/should-indian-farmer-think-of-his.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/9023036196433783167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/9023036196433783167'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/08/should-indian-farmer-think-of-his.html' title='Should Indian farmer think of his family&amp;#39;s hunger or the country&amp;#39;s?'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-4990588127627599907</id><published>2009-08-15T15:15:00.001+05:30</published><updated>2009-08-15T15:15:10.693+05:30</updated><title type='text'>Return value from system() is not reliable</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Recently I happen to use this nifty utility available on the Linux platform to perform some maintenance work, a bit of housekeeping, before my application starts up. The need for this is not really important. Essentially, the environment needed to be configured for my application to start up and start functioning properly. This, ideally, should have been done by a configuration/setup script, probably written in Python or a similar programming language, which are meant for such tasks. But unfortunately I did have that privilege and I had to do every bit of it from my C-program. The task were simple and very regular, like clearing a workspace directory, setting appropriate permissions and the like. The initial thought was to use the dirent family of functions aka OS system calls to read the filesystem and modify it programatically. But doing that whole thing was a big PITA. Hence I took the easy route and simply used the system() function, which will execute shell commands.&lt;br/&gt;&lt;br/&gt;The problem with this easy approach is that tracking the operation's success is really hard. The system() man page says that the function will return the actual value returned by the command that we pass to it to be executed. But sadly this is not how things are, at least on the Linux 2.6 machine on which I am developing and running my code. The return value from this system() function is highly unreliable. In fact the man page also puts it in there, but in a very subtle way. Here is a quote from the man page:&lt;br/&gt;&lt;blockquote&gt;&lt;pre&gt;     The &amp;lt;b&amp;gt;system&amp;lt;/b&amp;gt;() function returns the exit status of the shell as returned by&lt;br /&gt;     &amp;lt;b&amp;gt;&amp;lt;a href="http://www.manpagez.com/man/2/waitpid/"&amp;gt;waitpid(2)&amp;lt;/a&amp;gt;&amp;lt;/b&amp;gt;, or -1 if an error occurred when invoking &amp;lt;b&amp;gt;&amp;lt;a href="http://www.manpagez.com/man/2/fork/"&amp;gt;fork(2)&amp;lt;/a&amp;gt;&amp;lt;/b&amp;gt; or&lt;br /&gt;     &amp;lt;b&amp;gt;&amp;lt;a href="http://www.manpagez.com/man/2/waitpid/"&amp;gt;waitpid(2)&amp;lt;/a&amp;gt;&amp;lt;/b&amp;gt;.  A return value of 127 means the execution of the shell&lt;br /&gt;     failed.&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;br/&gt;I am not fully clear with the process semantics, but from my observations when I execute a command using this system() function the command would have executed successfully, as in, the corresponding operation would have been completed, and yet the return value would be -1, telling me that the execution of the command has failed somewhere but it does not tell me where. For example, if it is a command to clear a directory and create some other directory structure there, all these tasks would be completed. The old directory would be gone and the new ones created. I see that when I just navigate to that location from the command line, but system() would have returned -1. I initially was checking the return value to handle the failures and was taking some fail safe steps. But all that was happening even when it was all good. The logs repeatedly told me that the operations were failing where as it was all good actually.&lt;br/&gt;&lt;br/&gt;The reason for this is not known to me. It probably lies in the quote from the man page that I have put above. As it says -1 can be returned for any of the errors, be it error from fork or wait. Now if the error was from wait, which I am guessing is the case, it makes a little sense. I think the fork and exec went through properly and the command performed the required action without any error. But later the wait failed and the system() could not collect the exit status and hence returned -1. This is the only thing that I can think of. Nevertheless bottom line is, Return value from system() is not reliable.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=b00c56fc-d06d-8f2a-8f0a-7ebea9d169ab' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-4990588127627599907?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/4990588127627599907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/08/return-value-from-system-is-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4990588127627599907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4990588127627599907'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/08/return-value-from-system-is-not.html' title='Return value from system() is not reliable'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-8169751153424039605</id><published>2009-07-22T02:33:00.000+05:30</published><updated>2009-07-22T02:35:13.744+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='JS'/><category scheme='http://www.blogger.com/atom/ns#' term='IRC'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='extensions'/><category scheme='http://www.blogger.com/atom/ns#' term='xul'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Networks'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Getting the size of an already loaded page (from cache) in a Firefox extension.</title><content type='html'>Today this question came up in the IRC (moznet, #extdev). One of the add-on developers wanted to get the size of the page, either bytes or number of characters. The most obvious thing that came to my mind was &lt;a target="_blank" href="https://developer.mozilla.org/en/Code_snippets/Progress_Listeners"&gt;progress listeners&lt;/a&gt; for definitive answers or the content length from the channel for not so critical scenario. But then he said he wants it for an already loaded page. And he further said that the information is already there somewhere as it is shown by the Page Info dialog (Right Click on a web page and select View Page Info). He was indeed right. Somebody in the code is already going through the trouble of calculating the data size and we can just re-use that. And I immediately started the quest to find that out.&lt;br /&gt;&lt;br /&gt;As usual to figure out any browser component I opened up DOM Inspector. That tool is improving, which was against my earlier perception (Sorry Shawn Wilsher), though the highlighting part is still screwed up. Nevertheless, locating that particular label "Size" and the textbox in front of it containing the value was not difficult at all. I got the "id" of the textbox containing the size value. (Its "sizetext" :) ).&lt;br /&gt;&lt;br /&gt;Next it was MXR (http://mxr.moziila.org/) in action. I did a text search for the id and got a bunch of results, one of which was pageInfo.js with this entry : &lt;a href="http://mxr.mozilla.org/mozilla-central/source/browser/base/content/pageinfo/pageInfo.js#489"&gt;line 489&lt;/a&gt; --    &lt;a class="d" href="http://mxr.mozilla.org/mozilla-central/ident?i=setItemValue"&gt;setItemValue&lt;/a&gt;("sizetext", &lt;a class="d" href="http://mxr.mozilla.org/mozilla-central/ident?i=sizeText"&gt;sizeText&lt;/a&gt;); . It is &lt;a target="_blank" href="http://mxr.mozilla.org/mozilla-central/source/browser/base/content/pageinfo/pageInfo.js#489"&gt;here&lt;/a&gt;. The very line made it apparent that it is the place where the value is being set and hence it is the place from where I can get to know how the value is being calculated.&lt;br /&gt;&lt;br /&gt;Once I saw the code it was very clear and straight forward and pretty simple also. We have the URL. From the URL we get the cache entry for that URL. (Every cache entry has a key and that key is the URL - so neat). We try to get the cache entry from the HTTP Session first and if that fails we try FTP Session. The cache entry has the size as an attribute on itself, so its just getting that attribute value. DONE.&lt;br /&gt;&lt;br /&gt;I am not sure how this will behave if we have disabled every type of cache. AFAIK, there will still be some in-memory cache as long as the page is still loaded. Probably good enough.&lt;br /&gt;&lt;br /&gt;That was the end of a small but interesting quest. :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-8169751153424039605?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/8169751153424039605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/07/getting-size-of-already-loaded-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8169751153424039605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8169751153424039605'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/07/getting-size-of-already-loaded-page.html' title='Getting the size of an already loaded page (from cache) in a Firefox extension.'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-8946411626077477829</id><published>2009-06-27T19:59:00.001+05:30</published><updated>2009-06-27T19:59:21.309+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='IRC'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='education'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='gyaan'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Getting Open Source/Mozilla in my college - SJCE - Part I</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Earlier I had written about &lt;a href='http://techbrahmana.blogspot.com/2009/03/my-first-mozilla-education-status-call.html' target='_blank'&gt;my first Mozilla Education Status Call&lt;/a&gt; in which I mentioned my interest to bring Open source software in general and Mozilla in specific to my college, &lt;a href='http://www.sjce.ac.in/' target='_blank'&gt;SJCE&lt;/a&gt;. Well, good news, it did not stop at that blog post. Actually speaking it had not started with that blog post either. It has been a long standing wish of mine, even from my college days when I participated in the Google Summer of Code 2007. (More about  it &lt;a href='http://techbrahmana.blogspot.com/2007/06/my-gsoc-2007-story.html' target='_blank'&gt;here&lt;/a&gt;). Back then there were a lot of short-comings, both from my side and the institution's side to actually make this idea into reality. Nevertheless, past is past and no point in brooding about it now. The good thing is that now both I and my institution have overcome our short-comings and we have started working towards making that idea into a reality.&lt;br/&gt;&lt;br/&gt;Now for some background aka story telling (which I like the most :) )&lt;br/&gt;&lt;br/&gt;As stated earlier nothing happened about this idea when I was in my college. Then after passing out of the college and having worked in the industry for about 12-18 months it hit me, very hard, that I did not learn a lot of things during my life as an engineering student which otherwise would have helped me a lot in my professional life. Also I learnt that I was not competent enough as an engineering graduate as compared to some of my foreign counterparts and also those from some of the "famed premier" engineering institutions of the country. It was not just one thing or two, but I saw differences in many aspects, both theoretical and practical. Gradually it occurred to me that these two aspects are inter-related. Since we did not have proper practical experience and exposure to real world software development we never really appreciated the basic theoretical concepts of computer science, which formed our regular syllabus. Note that here I am saying "we" and not "I". This part of the story talks about the state of most of my classmates and that is the worst part. Nevertheless, the moral of the story is the good old philosophy of teaching that the theory and practice should go hand in hand.&lt;br/&gt;&lt;br/&gt;Now there is another part to this story. Before I start with it let me tell you that whatever I am putting here is based on what I have perceived. I &lt;b&gt;may&lt;/b&gt; be wrong, but I personally don't think so. And this is absolutely not about boasting about myself. So the other part of the story is that, my association with Open Source development communities, Mozilla to be specific, has greatly helped me in my professional life. I am not going to give examples, but it has really really helped me a lot. Also it has sort of put me ahead of several other capable classmates and most juniors of mine (with the difference being considerably more in the case of juniors). The only differentiating factor between me and them was my exposure to developing a real world application, Mozilla Firefox, and the various lessons that I have learnt by being a part of the global developer community. I am also certain that I could have been a much better computer engineer if I had started working with Mozilla at a much earlier stage, say 2nd year or early 3rd year of engineering and had dedicated more time to it. I still continue to learn a lot of general computer science and software development concepts (concepts not specific to Mozilla development) even now whenever I try to fix a Mozilla bug or even when I try to answer any query on the IRC, many a times even when I just observe few people conversing on the IRC.&lt;br/&gt;&lt;br/&gt;Ok, enough of story telling. Now is the part for moral of the story. Here is what I inferred from these experiences:&lt;br/&gt;&lt;br/&gt;1) Engineering students, specifically Computer Science engineering students, must get exposure to real world engineering (aka application development) to understand and appreciate the theoretical concepts they learn.&lt;br/&gt;2) Open source software development communities provide a suitable environment for students to work with real world applications. Suitable in terms of - opportunities, cost, mentoring and certainly a few more good things also.&lt;br/&gt;&lt;br/&gt;With these two points, it was clear to me that we badly needed open source education/exposure for students in my college. I knew that once this happened the possibilities were endless. Every time I heard/read about some of the classic Free Software implementations done at Universities abroad, I thought that our college can at least have several continuous contributors to currently existing open source projects, if not have creators of some totally new world class software projects. We could be having several different groups of students working of different types of software which operate at various levels (which translates to contributing to different open source software). Then they all could be interacting to help each other in troubleshooting problems. I thought of scenarios/discussions like this happening in the hostel corridors:&lt;br/&gt;&lt;br/&gt;&lt;blockquote&gt;Student_1 and Student_2 are working on the Mozilla Download Manager (and here goes the conversation) &lt;br/&gt;&lt;br/&gt;Student_1 : Hey, I want to test my new implementation for Mozilla Download Manager for HTTPS downloads. I am unable to configure my test server for HTTPS. You got any idea?&lt;br/&gt;Student_2 : No dude, never done any server side stuff. Lets ask Student_3 from the Apache team.&lt;br/&gt;&lt;br/&gt;Then Student_3 comes and sets up Apache for HTTPS within minutes (because that's day-to-day kind of stuff for him) and Student_1 continues testing his new implementation. &lt;br/&gt;&lt;br/&gt;After some time:&lt;br/&gt;&lt;br/&gt;Student_1 : Oh man, SSL handshake is taking too much time. I need to talk to Student_4, he knows the SSL library code base. &lt;br/&gt;Student_2 : Yeah, I talked about that to Student_4. He is coming up with a patch to reduce the handshake time. It will probably be ready by tomorrow, I guess. Apparently it was a race condition causing the delays.&lt;br/&gt;&lt;/blockquote&gt;&lt;br/&gt;And so on.&lt;br/&gt;&lt;br/&gt;Something like this is really possible. In fact many things much bigger than this are possible. But only if our students start working with and for open source communities.&lt;br/&gt;&lt;br/&gt;So this set of thoughts made me work towards getting Open Source into my college. Now that's the background and the story. In the next part I will write about the first set of steps taken towards this, how many of them worked and how many were dead even before they started. And just FYI, the next post too will have some story telling (Obviously since this is just a record of my experiences and my (our) actions).&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-8946411626077477829?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/8946411626077477829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/06/getting-open-sourcemozilla-in-my.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8946411626077477829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8946411626077477829'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/06/getting-open-sourcemozilla-in-my.html' title='Getting Open Source/Mozilla in my college - SJCE - Part I'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-9060559531056623552</id><published>2009-06-25T13:58:00.001+05:30</published><updated>2009-11-25T12:41:44.893+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='gyaan'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Vim -- Restoring cursor from previous session</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;font face='sans-serif'&gt;I am sure every Vim user needs this. Its just so frustrating to open a source file to see the #includes (the &lt;/font&gt;first few lines) in the file when we actually will be editing many hundred lines later. Today specially I was juggling with several source files, adding something to the .h file and then come back, do something in the .cpp file and then again go to some .c file and so on. Every time I opened a file the cursor was at the first line and every time invariably I had to search for the function I was editing and cycle through the matches to reach it. So I set on a "Search Mission" - A mission to search for the appropriate .vimrc settings to make Vim remember the cursor position from the previous session.&lt;br/&gt;&lt;br/&gt;I got a lot of links. In fact there is a separate Vim Tip - &lt;a href='http://vim.wikia.com/wiki/VimTip80'&gt;Vim Tip #80&lt;/a&gt; for this. But it has so many code lines and I was a little wary to put all that in my .vimrc file. Continued search revealed me a simpler way. Just two lines solution and it is here : &lt;a href='http://www.dotfiles.com/files/9/265__gvimrc'&gt;Some Mr.Gopinath's .vimrc file&lt;/a&gt;. Its very big, but the lines concerning me are:&lt;br/&gt;&lt;br/&gt;" VimTip 80: Restore cursor to file position in previous editing session&lt;br/&gt;" for unix/linux/solaris&lt;br/&gt;set viminfo='10,\"100,:20,%,n~/.viminfo&lt;br/&gt;&lt;br/&gt;" only for windows [give some path to store the line number info]&lt;br/&gt;"set viminfo='10,\"100,:20,%,nc:\\Winnt\\_viminfo&lt;br/&gt;au BufReadPost * if line("'\"") &amp;gt; 1 &amp;amp;&amp;amp; line("'\"") &amp;lt;= line("$") | exe "normal! g`\"" | endif&lt;br/&gt;&lt;br/&gt;Looks like he also picked this up from the same Vim Tip #80 but was smart enough to take out only the necessary part. Nevertheless, this works for me. Thank you Mr. Gopinath.&lt;br/&gt;&lt;br/&gt;Happy Vimming :-)&lt;br/&gt;&lt;br/&gt;Edit:&lt;br/&gt;&lt;br/&gt;I read the Vim Tip #80 again and it made more sense this time. I picked up the last line for a user comment. Now the cursor is put back on the same column too.&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=bbb514c4-353e-8ac7-9187-a5b787828ba7' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-9060559531056623552?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/9060559531056623552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/06/vim-restoring-cursor-from-previous.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/9060559531056623552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/9060559531056623552'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/06/vim-restoring-cursor-from-previous.html' title='Vim -- Restoring cursor from previous session'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-1905511561118064141</id><published>2009-04-24T01:16:00.003+05:30</published><updated>2009-04-24T01:31:11.150+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Recursively rename files in windows</title><content type='html'>My friend Prasanna B P asked me to solve a bunch of problems that he was facing with his computer. One of them was fairly common and there was a very easy and straight forward brute force solution. But coming up with a "smart" was really interesting.&lt;br /&gt;&lt;br /&gt;Essentially some malware had renamed all the movie files that he had to carry a .jpg extension. His initial solution was to associate those jpg files with a movie player like Mplayer123 or VLC and the file would be invariably played without any regard to the extension. But this made the genuined jpg pictures to be opened with the player.&lt;br /&gt;&lt;br /&gt;The obvious solution was to rename all the files and change the extension. Manually doing it from the GUI is the brute force idea that I earlier mentioned. And it is a totally crappy one. Next I can rename all files in a directory from the command line. But here the movie files were in directories of their own and hence I would have to move to each directory manually and run the rename command. This makes it as good as the GUI approach. In fact the extra effort of typing the commands might make it worse.&lt;br /&gt;&lt;br /&gt;The I searched the internet a little and got to know that the windows command shell supports a "FOR" statement which can be used to recursively traverse directories, amongst many other things it provides. Using that I found this command:&lt;br /&gt;&lt;blockquote&gt;FOR /R %x IN (*.jpg) DO ren "%x" *.avi &lt;/blockquote&gt;from this website : http://stackoverflow.com/questions/210413/command-line-recursive-renamemove-in-windows&lt;br /&gt;&lt;br /&gt;People used to Linux Shell scripting might think of this as a wierd syntax, but yeah thats the windows choice.&lt;br /&gt;&lt;br /&gt;It was good to do some Windows Shell scripting too. :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-1905511561118064141?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/1905511561118064141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/04/recursively-rename-files-in-windows.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1905511561118064141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1905511561118064141'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/04/recursively-rename-files-in-windows.html' title='Recursively rename files in windows'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-1199822163206689113</id><published>2009-04-17T19:50:00.002+05:30</published><updated>2009-04-28T18:02:18.355+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='code performace'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>Profiling (timing) the firefox build process</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Its been nearly 2 years since I am building Mozilla Firefox myself on my machines - various machines of varying capacity.&lt;br /&gt;&lt;br /&gt;Initially it was a desktop having Intel Pentium 4, Single Core (obviously), 2.6Ghz, 256MB RAM, running Slackware 11. It probably used to take about 1.5 to 2 hours (I do not remember it now). I never profiled that at that time. Getting a mozilla build itself was a big achievement for me.&lt;br /&gt;&lt;br /&gt;After that it was another desktop having Intel Core 2 Duo, Dual Core (obviously, again), 2.4 GHz, 2GB RAM, running Windows XP. This generally took about 45 minutes. AFAI Remember, I had several other programs running when firefox was building.&lt;br /&gt;&lt;br /&gt;And this discussion of amount of time taken to build firefox came up a few times in IRC and I myself had this wish to time the build process. Off late, that is from about last week this wish became very strong and today finally I did time it, that too on two machines, my laptop and my desktop. This blog post is the result of the these two profiling tasks. Here are the results.&lt;br /&gt;&lt;br /&gt;Note: By profiling I did not do any complicated or intricate. I just used the "time" utility which tells how much time the command takes.&lt;br /&gt;&lt;br /&gt;1) On my laptop.  --- Build was the only application running apart from the services.&lt;br /&gt;&lt;u&gt;Specs:&lt;/u&gt;&lt;br /&gt;IBM Thinkpad T60p. (The one which heats up a lot)&lt;br /&gt;Intel Centrino Duo, T2600 @ 2.16GHz, (Dual Core)&lt;br /&gt;2GB RAM&lt;br /&gt;Windows XP Pro SP2.&lt;br /&gt;&lt;br /&gt;The results shown by the "time" utility are:&lt;br /&gt;&lt;br /&gt;real    36m33.476s&lt;br /&gt;user    4m17.776s&lt;br /&gt;sys     4m36.271s&lt;br /&gt;&lt;br /&gt;The build was done in the MingW shell that the mozilla build system provides. I am not sure to what extent these are reliable, but the real time is pretty much acceptable.&lt;br /&gt;&lt;br /&gt;Edit:&lt;br /&gt;&lt;br /&gt;Today I ran the build command from the history and hence the 'time" prefix got in automatically and the build was timed again. Surprisingly today's  times are way away from the last one. Here are the times:&lt;br /&gt;&lt;br /&gt;real    74m26.484s&lt;br /&gt;user    9m53.015s&lt;br /&gt;sys     8m18.365s&lt;br /&gt;&lt;br /&gt;Well this time a lot of other apps were running. Firefox (2 instances), Chatzilla, Outlook, Several command windows, Komodo Edit (which again is like another firefox), notepad and a couple of explorer windows. So the time being doubled is not a surprise. Guess this just gives a perspective. :)&lt;br /&gt;&lt;br /&gt;2) On my desktop  --- Apart from the build process, FF with Chatzilla was running and several instances of bash (Terminals) were running.&lt;br /&gt;&lt;u&gt;Specs:&lt;/u&gt;&lt;br /&gt;DELL Optiplex 755 (Sleak, powerful, sometimes fragile)&lt;br /&gt;Intel Core 2 Quad, Q6600 @ 2.4Ghz&lt;br /&gt;4GB RAM&lt;br /&gt;Ubuntu, Gutsy Gibbon&lt;br /&gt;&lt;br /&gt;And the results are:&lt;br /&gt;&lt;br /&gt;real    20m40.497s&lt;br /&gt;user    19m4.320s&lt;br /&gt;sys     1m17.885s&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The two sets of times are a little confusing. But real is all that matters as that is how long I have to wait for the build to be ready.&lt;br /&gt;&lt;br /&gt;If you are planning a build then this info might help you plan things accordingly.&lt;br /&gt;&lt;br /&gt;Happy building.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="zemanta-pixie"&gt;&lt;img src="http://img.zemanta.com/pixy.gif?x-id=f1d025e8-12c1-8ca0-bf29-f76c7072443b" class="zemanta-pixie-img" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-1199822163206689113?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/1199822163206689113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/04/profiling-timing-firefox-build-process.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1199822163206689113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1199822163206689113'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/04/profiling-timing-firefox-build-process.html' title='Profiling (timing) the firefox build process'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-8220953328124210049</id><published>2009-04-06T14:24:00.000+05:30</published><updated>2010-10-15T04:00:13.546+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='wildLife'/><category scheme='http://www.blogger.com/atom/ns#' term='animals'/><title type='text'>Camouflage in full action -- Totally mind boggling</title><content type='html'>&lt;object width="320" height="266" class="BLOG_video_class" id="BLOG_video-efc8a0fefc72fc34" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http%3A%2F%2Fv14.nonxt7.googlevideo.com%2Fvideoplayback%3Fid%3Defc8a0fefc72fc34%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1289242835%26sparams%3Did%252Citag%252Cip%252Cipbits%252Cexpire%26signature%3D46675E7B1D30C22F91EEDA65D9BBA957D8ACB12D.B66FDC706226AACCEDC63D66DAA556FAE35009A%26key%3Dck1&amp;amp;iurl=http%3A%2F%2Fvideo.google.com%2FThumbnailServer2%3Fapp%3Dblogger%26contentid%3Defc8a0fefc72fc34%26offsetms%3D5000%26itag%3Dw160%26sigh%3DoCYPYvbeU0ThWT1SVQcOuilioTs&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player"width="320" height="266" bgcolor="#FFFFFF"flashvars="flvurl=http%3A%2F%2Fv14.nonxt7.googlevideo.com%2Fvideoplayback%3Fid%3Defc8a0fefc72fc34%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1289242835%26sparams%3Did%252Citag%252Cip%252Cipbits%252Cexpire%26signature%3D46675E7B1D30C22F91EEDA65D9BBA957D8ACB12D.B66FDC706226AACCEDC63D66DAA556FAE35009A%26key%3Dck1&amp;iurl=http%3A%2F%2Fvideo.google.com%2FThumbnailServer2%3Fapp%3Dblogger%26contentid%3Defc8a0fefc72fc34%26offsetms%3D5000%26itag%3Dw160%26sigh%3DoCYPYvbeU0ThWT1SVQcOuilioTs&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Even the makers of the bond movies did not think of anything as crazy as this. This was a real stunner for me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-8220953328124210049?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='enclosure' type='video/mp4' href='http://www.blogger.com/video-play.mp4?contentId=efc8a0fefc72fc34&amp;type=video%2Fmp4' length='0'/><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/8220953328124210049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/04/camouflage-in-full-action-totally-mind.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8220953328124210049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8220953328124210049'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/04/camouflage-in-full-action-totally-mind.html' title='Camouflage in full action -- Totally mind boggling'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-4431568382362732620</id><published>2009-04-03T18:42:00.001+05:30</published><updated>2009-04-03T18:42:03.795+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='JS'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='code performace'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>Making firefox use a little lesser memory</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;A lot people tell me that firefox uses a lot of memory and it grows like anything when used for a long duration. From the discussions developers and some blog posts/forums it appears the prior to FF3 it was memory leaks which formed a major part of this. Apart from that one of the important features "bfcache - Back/Forward Cache" which, arguably, makes back and forward navigation very fast, uses a lot of memory. In on the pages I read apparently it can be up to 4MB per page. This cache essentially keeps the parsed HTML of the mark-up in the memory along with the Javascript state. Sometimes, or more like most of the times, this can very taxing. You might be the kind of person who does not really uses the Back-Forward navigation and in case you do it you are OK with a slight delay (which may not percievable with a good conenction). If indeed you are that kind then disabling this "bfcache" will probably make your firefox eat lesser memory.&lt;br/&gt;&lt;br/&gt;The setting/preference that controls this behavior is : &lt;b&gt;browser.sessionhistory.max_total_viewers&lt;br/&gt;&lt;br/&gt;&lt;/b&gt;By default it is -1, which is no limit. Setting this to 0 (zero) will disable this cache completely. Essentially you are telling Firefox to not to store the state of any document in the memory. If you want to have this feature with a saner limit you can set it to an integer representing the number of pages you want to be saved in memory.&lt;br/&gt;&lt;br/&gt;Like any other pref not exposed through the Options dialog this has to be edited by visiting the page about:config. Open this in a tab and key in (or copy and paste) the preference string. Double click it to edit. &lt;br/&gt;&lt;br/&gt;May be you can now lose lesser hair as your other applications will run smoothly. :P&lt;br/&gt;&lt;br/&gt;Hari Om.&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=a8cac5bb-b10e-8647-9f20-615bedaeacd9' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-4431568382362732620?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/4431568382362732620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/04/making-firefox-use-little-lesser-memory.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4431568382362732620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4431568382362732620'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/04/making-firefox-use-little-lesser-memory.html' title='Making firefox use a little lesser memory'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-4095702861549677607</id><published>2009-04-02T11:30:00.000+05:30</published><updated>2010-10-15T04:00:13.564+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='humour'/><category scheme='http://www.blogger.com/atom/ns#' term='career'/><title type='text'>April 2009 - Appraisal</title><content type='html'>This was making rounds as email forward. Just could not laughing for a loooooong time..&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;b&gt;Y&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:180%;color:#000080;"&gt;&lt;b&gt;ou and Your BOSS&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_T1WCFnGzcp8/SdRVCguCipI/AAAAAAAABt4/jBK4sIc_TbE/s1600-h/April+2009+-+Appraisal.jpg"&gt;&lt;img style="cursor: pointer; width: 400px; height: 301px;" src="http://3.bp.blogspot.com/_T1WCFnGzcp8/SdRVCguCipI/AAAAAAAABt4/jBK4sIc_TbE/s400/April+2009+-+Appraisal.jpg" alt="" id="BLOGGER_PHOTO_ID_5319970561462536850" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-4095702861549677607?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/4095702861549677607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/04/april-2009-appraisal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4095702861549677607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4095702861549677607'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/04/april-2009-appraisal.html' title='April 2009 - Appraisal'/><author><name>Srirang  (Brahmana)</name><uri>http://www.blogger.com/profile/17062039475270027427</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_T1WCFnGzcp8/SdRVCguCipI/AAAAAAAABt4/jBK4sIc_TbE/s72-c/April+2009+-+Appraisal.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-149626393518344532</id><published>2009-03-26T10:21:00.001+05:30</published><updated>2009-03-26T10:21:37.532+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='gmail'/><title type='text'>Undo "Always display images" switch in Gmail</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Gmail has this nifty and very useful feature to avoid mostly annoying images being displayed in our incoming emails. Whenever we get an email containing an embedded image, it is not displayed by default. Instead there appear two links at the top of the email saying:&lt;br/&gt;&lt;br/&gt;"Display images below"&lt;br/&gt;"Always display images from &amp;lt;this sender's email&amp;gt;"&lt;br/&gt;&lt;br/&gt;The first one is a one time thing and the second one is a setting for that particular email id.&lt;br/&gt;&lt;br/&gt;I once clicked on the second link accidentally and had unwanted images cluttering my email view. I looked for this thing to be turned off in the settings page, but found nothing. I had a very hard time undoing this accidental setting. Finally I discovered the solution also accidentally. The switch to undo this setting is "hidden" under the "Show Details" link for the email header.&lt;br/&gt;&lt;br/&gt;The right end of the very first line of the email, which contains the sender's name/email id", has this "Show Details" link. This shows the email header with several details. At the end is the link saying something like this:&lt;br/&gt;&lt;br/&gt;"Do not display images from this sender".&lt;br/&gt;&lt;br/&gt;Just use this switch to go back to the good old times of emails without images. :)&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=53d21078-819f-4dcd-803b-c3e30d907744' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-149626393518344532?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/149626393518344532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/03/undo-display-images-switch-in-gmail.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/149626393518344532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/149626393518344532'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/03/undo-display-images-switch-in-gmail.html' title='Undo &amp;quot;Always display images&amp;quot; switch in Gmail'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-6159256868902239826</id><published>2009-03-23T22:20:00.001+05:30</published><updated>2009-06-27T20:12:41.436+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='education'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='gyaan'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>My first Mozilla Education Status call</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Mozilla is the only open source community which I have understood a little and also to which I have contributed a little. I always wanted to make my college a sort of Mozilla hub with several contributors and many feature developments happening out of my college. It actually started with an idea of a "Complete Open Source Hub", but it got reduced to just "Mozilla Hub" (either because of my laziness or because of lack of resources). Anyways I did not take any proactive steps towards that wish of mine, until recently when our college got the "Autonomous" status. That is when I realized that bringing open source software development in the course mainstream has become a lot easier as the power to form the syllabus and conduct the tests and examination rests with my college itself and not the University.&lt;br/&gt;&lt;br/&gt;Just when I thought of doing something tangible, Mozilla came up with their "&lt;a href='https://wiki.mozilla.org/Education'&gt;Mozilla in Education&lt;/a&gt;" program. This is a brilliant idea to drive open source into the student community and also give the students opportunities to work on real world applications. I was impressed by this program the very moment I read about it. I decided to present this idea to my HOD at the college and get him to start working offering Mozilla education to students in my college. I started reading more about it and today I also attended my first &lt;a href='https://wiki.mozilla.org/Education/StatusMeetings'&gt;Mozilla Education status meeting&lt;/a&gt; conference call, which happens every week. I got a wealth of information.&lt;br/&gt;&lt;br/&gt;This week we had Pascal F presenting to us about the "&lt;a href='http://labs.mozilla.com/2009/01/introducing-the-design-challenge/'&gt;Design Challenge&lt;/a&gt;" program organized by the Mozilla Labs. He talked to us about the way in which they organized this program. It was all very inspiring. They had nearly 30-35 people from different parts of the world (literally). In this contest the students initially submitted mock-ups of their ideas, nearly 40 of them. Amongst those, 30 fully completed mock-ups were chosen for the second level, in which the students got mentoring by some the well known names in the Mozilla community. The mentoring consists of 10 Webinar sessions conducted using WebEx, over a period of 3 weeks. This is going on currently and will end at the end of this month. These mentoring sessions aim at converting those mock-ups into working prototypes. At the end, the best prototypes are given honors. &lt;br/&gt;&lt;br/&gt;During the presentation Pascal mentioned some interesting things. Of the students from various countries, it was the students from so called "2nd World Countries" (like Romania, India, Argentina, etc.. ) who showed a lot more interest than their US counterparts. There was tremendous enthusiasm in them where as the students from US expected -- in his own words -- "being entertained" and "spoon-fed". Though this is an alarming thing when viewed from a global perspective, I was personally very happy that Indian students, my fellow country-men, have shown such dedication. Pascal also mentioned that they were so interested that they were up in the middle of the nights for the webinars. All in all, I am even more motivated to bring open source in general and mozilla in particular to my college.&lt;br/&gt;&lt;br/&gt;I decided to take this program as an example and present it to my HOD this Saturday and try and make him accept this and similar programs as official ones and the projects done in such programs be considered for the completion of the course goals.&lt;br/&gt;&lt;br/&gt;Thank you Pascal, thank you Mozilla. Lets hope to have a Mozilla India Center, at least an unofficial one at my college &lt;a href='http://www.sjce.ac.in/'&gt;SJCE&lt;/a&gt;. :-)&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-6159256868902239826?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/6159256868902239826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/03/my-first-mozilla-education-status-call.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6159256868902239826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6159256868902239826'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/03/my-first-mozilla-education-status-call.html' title='My first Mozilla Education Status call'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-4447147608862645847</id><published>2009-03-18T19:41:00.001+05:30</published><updated>2009-03-18T19:41:20.383+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JS'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='extensions'/><category scheme='http://www.blogger.com/atom/ns#' term='xul'/><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>An official full-fledged Firefox Add-ons dev guide</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Having done a little work on Mozilla Firefox and extensions for it I have always felt the lack of an official, step by step document for extension development. I do accept that there are a lot of resources available on the internet. Innumerable number of blogs and tutorials explaining the process step by step. But most of them become outdated with newer versions of Firefox and the authors are not really keen about updating the info. That is why an official tutorial or guide from Mozilla itself would be the right thing. It will make sure the contents in the guide are up-to-date and worth reading for developing an extension for the currently available version of Firefox.&lt;br/&gt;&lt;br/&gt;There are documents for extension development on MDC like the various links present at: &lt;a href='https://developer.mozilla.org/en/Extensions'&gt;https://developer.mozilla.org/en/Extensions&lt;/a&gt; but it was either scattered or pretty brief in most places though it did touch most parts of extension development. Nevertheless a wholesome "official" guide was needed and here it is now. I went through the guide and as the blog post says it is still in BETA with a lot of "TO-DO" tags in there. In spite of that it is very much usable. Do visit it and post back your feedback to make it a much better guide.&lt;br/&gt;&lt;br/&gt;&lt;a href='http://blog.mozilla.com/addons/2009/03/11/firefox-add-ons-developer-guide/'&gt;Add-ons Blog » Blog Archive » Firefox Add-ons Developer Guide (beta release) - Calling all Add-on Developers!&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Lets hope we will have more and more quality extensions now. :-)&lt;br/&gt;&lt;blockquote/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=287325c9-2e2b-41bf-b169-a9d967ae816f' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-4447147608862645847?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/4447147608862645847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/03/official-full-fledged-firefox-add-ons.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4447147608862645847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4447147608862645847'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/03/official-full-fledged-firefox-add-ons.html' title='An official full-fledged Firefox Add-ons dev guide'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-6219139700012462729</id><published>2009-03-03T14:53:00.002+05:30</published><updated>2009-03-06T15:05:47.007+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='JS'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Networks'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>Browsers are undergoing continuous innovation.</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;It was sometime since I blogged about anything. I have had several things on mind and many of them are presents as drafts. But this one really caught my attention and I felt I should put in my thoughts about this.&lt;br /&gt;&lt;br /&gt;Until a couple of years, people rarely looked beyond Internet Explorer for their browsing experience, though they kept cursing it a lot. After that came the Mozilla Firefox web browser with its pack of addons allowing users to actually customize for their needs. They could actually make the browser do what they wanted it to do and not just set some options. The browser wars had started again. At least I started reading about browsers and started following up on things happening with these browsers. Opera and Safari and a few other, actually used, browsers were not really "news" as such.&lt;br /&gt;This was dying off. Firefox had created a sizable chunk of user base and was pretty stable with it. Except for few traditional enhancements like memory optimizations, bug fixes, etc.. nothing big was happening. It was a lot silent.&lt;br /&gt;&lt;br /&gt;Then came the next wave with Google announcing the release of its browser with a nice, easy to understand "comic" book. It came with a whole new paradigm for building browsers with the "process-per-tab" concept. It was really innovative. Though discussions about this happened in other browser communities also, Google Chrome was the first one to implement it. Also it boasted of its super-fast V8 JavaScript Engine and also the browser UI, which gave more screen real estate to content than chrome. This was a real big thing and made the browser wave go much higher than what it had ever been. With the Google branding a vast majority of internet users rushed to have a sneak peak at Google Chrome or may be try it or even keep it as their regular browser. There was a lot of noise about this and people indeed listened. Mozilla and IE people were not silent and did responded very well. Mozilla came up with its ultra-fast "Tracemonkey" JS engine, implementing the trace trees and there by making it much faster than V8. IE8 also has the "process-per-tab" and "private browsing" features first presented by Chrome. But like any other sound this too dampened a little after it was created and browsers were back in the silent phase doing traditional improvements and bug fixes. At least that's how I percieved the situation.&lt;br /&gt;&lt;br /&gt;[Edit 06-Mar-09 : Shawn Wilsher suggest that Tracemonkey had appeared before Chrome made the pubic appearance. He certainly knows these things better than me and I believe he is right. But still I wanted to keep my original post as it is and instead I put this separate edit note. :) ]&lt;br /&gt;&lt;br /&gt;But I was clearly, totally wrong. People have realized that internet is the place to be in the future and thats where a large part of our life will be. With browser being the main and central interface for people to use that internet, it makes a real good sense to make this browser as robust and reliable as possible. New things keep coming on the internet, both and &lt;a href="http://www.itpro.co.uk/609932/website-danger-as-hacker-breaks-ssl-encryption"&gt;bad&lt;/a&gt;, the &lt;a href="http://blogs.zdnet.com/security/?p=2339"&gt;latter being more often&lt;/a&gt;, and the browser has to keep up with all of it. What we thought yesterday as being a good design apporach might just look senseless tomorrow. There just seems no end to it and researchers appear all ready for it. I am coming across so many innovations happening in the browser domain. This article : &lt;a href="http://campustechnology.com/Articles/2009/02/26/Researchers-Say-Gazelle-Browser-Offers-Better-Security.aspx?Page=1"&gt;Researchers Say Gazelle Browser Offers Better Security -- Campus Technology &lt;/a&gt; -- gives us an idea about how much effort the scientists are putting in making our internet lives better. The article is about Gazelle, but it also mentions about another experimental browser OP.&lt;br /&gt;&lt;br /&gt;This browser Gazelle, uses the Trident rendering engine (used by IE) but builds upon a OS based process architecture where websites form the processes and they communicate by passing messages like IPC (Inter-process communication).&lt;br /&gt;&lt;br /&gt;I am not yet sure how this will all work out. Probably the websites need to built with some intelligence so that it can do the so called IPC when it actually has to. But the evoltion in browsers is for sure. They will not be same as they are now. Several things are going on along the &lt;a href="http://labs.mozilla.com/projects/concept-series/"&gt;UI front&lt;/a&gt;. When these things mature and come togther you can have the scenes of your favourite sci-fi movie scenes right in front of you everyday.&lt;br /&gt;&lt;br /&gt;Lets just hope these come soon enough for people like me to enjoy, not when I am all grey hair and toothless.&lt;br /&gt;&lt;br /&gt;Hari Om.&lt;br /&gt;&lt;br /&gt;&lt;div class="zemanta-pixie"&gt;&lt;img src="http://img.zemanta.com/pixy.gif?x-id=10e44039-49b4-4310-bc6c-e4ee7edd2d61" class="zemanta-pixie-img" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-6219139700012462729?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/6219139700012462729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/03/browsers-are-undergoing-continuous.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6219139700012462729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6219139700012462729'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/03/browsers-are-undergoing-continuous.html' title='Browsers are undergoing continuous innovation.'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-350479134136947321</id><published>2009-02-05T19:25:00.000+05:30</published><updated>2010-10-15T04:00:13.583+05:30</updated><title type='text'>Attitude -- Totally enviable</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;This is how knowledgeable you should be and also equally confident.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;object width="320" height="266" class="BLOG_video_class" id="BLOG_video-90bcaeec627a77f1" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http%3A%2F%2Fv3.nonxt6.googlevideo.com%2Fvideoplayback%3Fid%3D90bcaeec627a77f1%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1289242835%26sparams%3Did%252Citag%252Cip%252Cipbits%252Cexpire%26signature%3D59FDDCBA0D8E60D7BFC7677E7D137A8C2F54183C.3A0197859494D14286390030AA408838A34EB6F5%26key%3Dck1&amp;amp;iurl=http%3A%2F%2Fvideo.google.com%2FThumbnailServer2%3Fapp%3Dblogger%26contentid%3D90bcaeec627a77f1%26offsetms%3D5000%26itag%3Dw160%26sigh%3D7l393e4IVz3nNnlnXJE9JUy45NY&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player"width="320" height="266" bgcolor="#FFFFFF"flashvars="flvurl=http%3A%2F%2Fv3.nonxt6.googlevideo.com%2Fvideoplayback%3Fid%3D90bcaeec627a77f1%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1289242835%26sparams%3Did%252Citag%252Cip%252Cipbits%252Cexpire%26signature%3D59FDDCBA0D8E60D7BFC7677E7D137A8C2F54183C.3A0197859494D14286390030AA408838A34EB6F5%26key%3Dck1&amp;iurl=http%3A%2F%2Fvideo.google.com%2FThumbnailServer2%3Fapp%3Dblogger%26contentid%3D90bcaeec627a77f1%26offsetms%3D5000%26itag%3Dw160%26sigh%3D7l393e4IVz3nNnlnXJE9JUy45NY&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-350479134136947321?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='enclosure' type='video/mp4' href='http://www.blogger.com/video-play.mp4?contentId=90bcaeec627a77f1&amp;type=video%2Fmp4' length='0'/><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/350479134136947321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/02/attitude-totally-enviable.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/350479134136947321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/350479134136947321'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/02/attitude-totally-enviable.html' title='Attitude -- Totally enviable'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-8168477099844429247</id><published>2009-02-05T10:39:00.001+05:30</published><updated>2009-02-05T11:07:58.755+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Changing directory in which command window opens</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;For some reason my command prompt always opened up on my mapped network drive. That was probably because the network drive was set as my home or something. It was the sys-admins work about which I did not have any clue.&lt;br/&gt;&lt;br/&gt;Every time I had to change to my local disk drive and then navigate to the directory I wanted. Also the network drive caused a lot of delay when it was not available, making my PC freeze at times and there by making me very irritated. So I finally decided to get rid of the network drive. But I couldn't and I had to settle for changing the default location in which the command window opens. The link below has all the details for doing the needful. As usual with windows its a registry value :-)&lt;br/&gt;&lt;br/&gt;HKEY_CURRENT_USER \ Software \ Microsoft \ Command Processor &lt;br/&gt;              |&lt;br/&gt;              |&lt;br/&gt;              |____ Autorun = &lt;default want='' you='' that='' dir=''&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href='http://windowsxp.mvps.org/autoruncmd.htm'&gt;How to change the default startup directory for Command Prompt?&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;BTW, It mentions that this setting will render the "Open Command Window Here" XP PowerToy. Nothing like that happened to me, at least not yet. So you can be assured that both of these will work in harmony.&lt;br/&gt;&lt;br/&gt;Happy Commanding. ;-)&lt;br/&gt;&lt;blockquote/&gt;&lt;/default&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-8168477099844429247?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/8168477099844429247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/02/changing-directory-in-which-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8168477099844429247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8168477099844429247'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/02/changing-directory-in-which-command.html' title='Changing directory in which command window opens'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-9002395272917574553</id><published>2009-02-04T16:42:00.004+05:30</published><updated>2009-02-05T11:24:47.861+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='xul'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Image for a statusbar panel in a firefox extension</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;I was working on a firefox extension which, like many other extensions, was adding a small button to the status bar. Doing this is very clearly explained here in : &lt;a href="https://developer.mozilla.org/en/Creating_a_status_bar_extension"&gt; this MDC tutorial&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I followed the instructions properly but to my surprise I did not see the image on the status bar, but just a square box in the defualt chrome color. I tried forums/web search and the IRC too, but no help. Then I read the statusbarpanel reference page - &lt;a href="https://developer.mozilla.org/en/XUL/statusbarpanel"&gt;statusbarpanel - MDC&lt;/a&gt; -- completely and it appears that for the image to show up the statusbarpanel has to be of a specific class called : "statusbarpanel-iconic". I just added that and it worked. :-)&lt;br /&gt;&lt;br /&gt;Here is my code&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;statusbar id="status-bar"&amp;gt;&lt;br /&gt;     &amp;lt;statusbarpanel id="graph_status_bar_panel"&lt;br /&gt;              image="chrome://myext/skin/chart_status_bar.png"&lt;br /&gt;              class="statusbarpanel-iconic" onclick="toggleGraphPanel(event)"&lt;br /&gt;              tooltiptext="View Graph Panel" /&amp;gt;&lt;br /&gt;&amp;lt;/statusbar&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-9002395272917574553?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/9002395272917574553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/02/image-for-statusbar-panel-in-firefox.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/9002395272917574553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/9002395272917574553'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/02/image-for-statusbar-panel-in-firefox.html' title='Image for a statusbar panel in a firefox extension'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-4379143143842472151</id><published>2009-01-23T18:04:00.007+05:30</published><updated>2009-01-23T18:33:35.809+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='blog'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><title type='text'>Pictorial representation of blog</title><content type='html'>I came across this &lt;a href="http://shawnwilsher.com/archives/190"&gt;post by Shawn (sdwilsh)&lt;/a&gt; and instantly wanted to know what I am concentrating on in my blogs. And here is what my blog has to say:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_T1WCFnGzcp8/SXm_-8_D-4I/AAAAAAAABkQ/x4H7gMBuTU0/s1600-h/myBlog-Pictorially-bw.PNG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 182px;" src="http://2.bp.blogspot.com/_T1WCFnGzcp8/SXm_-8_D-4I/AAAAAAAABkQ/x4H7gMBuTU0/s400/myBlog-Pictorially-bw.PNG" alt="" id="BLOGGER_PHOTO_ID_5294473925194152834" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_T1WCFnGzcp8/SXm6XF88zrI/AAAAAAAABkA/jcc3lH80MCw/s1600-h/myBlog-Pictorially.PNG"&gt;&lt;img style="cursor: pointer; width: 320px; height: 232px;" src="http://4.bp.blogspot.com/_T1WCFnGzcp8/SXm6XF88zrI/AAAAAAAABkA/jcc3lH80MCw/s320/myBlog-Pictorially.PNG" alt="" id="BLOGGER_PHOTO_ID_5294467742848306866" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;br /&gt;Here is the link where you can get one for your blog : &lt;a href="http://www.wordle.net/"&gt;http://www.wordle.net/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Happy picturing. :-)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-4379143143842472151?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/4379143143842472151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/01/pictorial-representation-of-blog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4379143143842472151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4379143143842472151'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/01/pictorial-representation-of-blog.html' title='Pictorial representation of blog'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_T1WCFnGzcp8/SXm_-8_D-4I/AAAAAAAABkQ/x4H7gMBuTU0/s72-c/myBlog-Pictorially-bw.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-5789779080589680922</id><published>2009-01-14T18:21:00.000+05:30</published><updated>2009-01-14T18:22:08.891+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='JS'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Documentation appears by itself -- from the code.</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;a href='http://www.toolness.com/wp/?p=441#comment-1487'&gt;Beautifully Documented Code at Toolness&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I am slightly into web and web related development and as part of that I come across various JavaScript (JS) libraries which  claim to make my life a lot easier and many of them actually do that. But several times there is a big hurdle that I have to cross before actually things become easy. Its understanding how to use that library. This sometimes turns out to be a pain, often bigger than the one if I had done everything by myself without any external library.&lt;br/&gt;&lt;br/&gt;This is probably all going to change. The lack of documentation might just vanish and all the necessary documentation might start appearing from the code itself. And the steps for building this, collating things and publishing on website are taken care of. You just need to annotate your code with the right tags and the JavaScript linked at the top (Written by Atul) will do the documentation generation and will also display it alongside code. &lt;br/&gt;&lt;br/&gt;This is particularly useful for libraries providing various APIs as the users can see a function in the raw code and understand its meaning and purpose and the arguments it expects and its return value. All in once place at one time.&lt;br/&gt;&lt;br/&gt;This is really cool. Go check out the tool and give the world a better library to use :-)&lt;br/&gt;&lt;br/&gt;Happy (auto)Documenting &lt;br/&gt;&lt;blockquote/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-5789779080589680922?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/5789779080589680922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/01/documentation-appears-by-itself-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5789779080589680922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5789779080589680922'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/01/documentation-appears-by-itself-from.html' title='Documentation appears by itself -- from the code.'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-7109354334044277824</id><published>2009-01-06T00:28:00.000+05:30</published><updated>2009-01-06T00:29:33.254+05:30</updated><title type='text'>The best blonde joke ever</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I never really blog about jokes, and never for sure on my tech blog. But this one is the best ever &lt;a href='http://me.woot.net/blonde-joke.html' target='_blank'&gt;blonde joke&lt;/a&gt;. Its simple awesome.&lt;br/&gt;&lt;blockquote/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-7109354334044277824?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/7109354334044277824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2009/01/best-blonde-joke-ever.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/7109354334044277824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/7109354334044277824'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2009/01/best-blonde-joke-ever.html' title='The best blonde joke ever'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-4031282402873192571</id><published>2008-11-21T16:02:00.001+05:30</published><updated>2008-11-21T16:02:58.026+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Networks'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Editing remote files smoothly in vim on windows</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I have a laptop and a desktop. Desktop runs Ubuntu, by choice, and laptop has to run Windows, by force. But most of my work happens on the Linux desktop itself. So when I am away from the desktop I would login to my desktop via SSH using PuTTy. It works fine when I am still on the corporate LAN, but the problem starts when I go home and get on to VPN. The speed and the responsiveness simply demotivates me and I tend to waste a lot of time specially when I am editing files with vim, because every keystroke has to travel across the network to my desktop and the response is to be sent back to my laptop. Coding really becomes hell with this.&lt;br/&gt;&lt;br/&gt;Recently I got to know that VIM has identified this problem quite some time back and has a solution in store. You can open a remote file over SCP, where in VIM would bring down that file to the local system and store in some temp location. You edit that temp file, with VIM running on your own machine. So do not have to wait for keystrokes to be processed by the remote machine. When you write the file, VIM updates the remote file using SCP. &lt;br/&gt;&lt;br/&gt;[Note]: If the file is read only, w! will not work. The user account used for SCP must have write permisson for the file you are editing. Otherwise, obviously, remote write fails and VIM will promptly report it.&lt;br/&gt;&lt;br/&gt;Look at &lt;a href='http://articles.techrepublic.com.com/5100-10878_11-6028859.html'&gt;this page&lt;/a&gt; for the syntax and more details.&lt;br/&gt;&lt;br/&gt;This would be straight forward on a linux box as both vim and scp come packed with the OS and they are in the shell execution path and everything is set up by default. Things need some extra work on Windows.&lt;br/&gt;&lt;br/&gt;First obvious thing is to install VIM. Then you would need a SCP program. And once again PuTTy comes to rescure. They have a PSCP.exe, which makes you feel at home even on Windows. Get it &lt;a href='www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html'&gt;here&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;To improve this a little more you can rename the PSCP.exe to scp.exe and place it in "C:\Windows\System32\" so that it will be picked up from everywhere at the command prompt. Also note that you can use your PuTTy saved sessions directly with PSCP.&lt;br/&gt;&lt;br/&gt;Happy remote VIMming. :-)&lt;br/&gt;&lt;br/&gt;Hari Om&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-4031282402873192571?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/4031282402873192571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/11/editing-remote-files-smoothly-in-vim-on.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4031282402873192571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4031282402873192571'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/11/editing-remote-files-smoothly-in-vim-on.html' title='Editing remote files smoothly in vim on windows'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-3743272122460206504</id><published>2008-10-21T22:30:00.000+05:30</published><updated>2011-11-26T23:55:14.783+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='CDN'/><category scheme='http://www.blogger.com/atom/ns#' term='ISP'/><category scheme='http://www.blogger.com/atom/ns#' term='gyaan'/><category scheme='http://www.blogger.com/atom/ns#' term='internet'/><category scheme='http://www.blogger.com/atom/ns#' term='Networks'/><category scheme='http://www.blogger.com/atom/ns#' term='policies'/><category scheme='http://www.blogger.com/atom/ns#' term='business'/><title type='text'>The ISP Cat and Mouse game and CDNs finally benefiting out of it.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Politics and policies are everywhere. They say policies are made to govern us and I say many of those are there for inertia - resistance to change. The big and powerful want to be so, always and do not want others to get there. This is well known and very much a cliche. But what has this got to do with ISPs in specific? Here we go:&lt;br /&gt;&lt;br /&gt;ISPs are the people who sort of own the "Internet network" physically. It is they who actually connect the various computers by physical cables. And yes, that is why we pay them. For getting us connected to the rest of the world. Now there is no single ISP who has his cables connected to all the computers in the world. In fact there is no one who can even boast about a majority stake in the market. So obviously when the data travels through the internet, it goes through the infrastructure laid and maintained by different ISPs. A simple example will illustrate this :&lt;br /&gt;&lt;br /&gt;Let's say a user is connected to the internet via Bharti Airtel connection and he is trying to access, say Indian Railways website, which is hosted on a machine connected to internet, for the sake of illustration, via BSNL connection. So the path of the request from client to the server would involve, both Airtel network path and BSNL network path. The client sends the request to the Airtel server. The Airtel network will route the data in its own network to the extent possible. At one point it needs to request BSNL network to take up the data and then give it to the destination server machine. Now at this cross-over point, Airtel is requesting some service from BSNL. Essentially Airtel is making use of the BSNL's network infrastructure to carry its data. Now there is no point in BSNL giving this for free. So obviously it charges Airtel some amout of money. Airtel does not mind paying it as it mostly gets translated to user charges. This is not really the issue. Problem would arise when BSNL will refuse to take the request and Airtel will have find some other alternate path, which generally ends up to be very very long. Consider this:&lt;br /&gt;&lt;br /&gt;Clinet -&amp;gt; Last Airtel machine (router) -- m number of hops&lt;br /&gt;Last Airtel machine -&amp;gt; Destination machine in BSNL network (Direct path) -- 4 hops.&lt;br /&gt;Last Airtel machine -&amp;gt; Destination machine in BSNL network (Indirect path via some other ISP or via some other cross-over point) -- 20 hops&lt;br /&gt;&lt;br /&gt;So totally the data has to do m+4 hops if BSNL takes up the request from last Airtel machine. At a time when BSNL is experiencing some heavy traffic in the region where the Airtel-BSNL crossover is happening, it would not be willing to accept more data, that too from a different ISP. So they follow two techniques here:&lt;br /&gt;&lt;br /&gt;1. Simply drop the data packets, which will result in bad experience for the end user.&lt;br /&gt;2. As routing happens based on least number of hops, the first BSNL server at the crossover point, will tell the last Airtel machine that the number of hops to the destination machine is actually 25 hops even though it is totally wrong. As a result the last Airtel machine will instead choose the indirect path with 20 hops. This will obviously slows down the internet and again result in bad experience for the end user.&lt;br /&gt;&lt;br /&gt;Now you see how policies and profits affect technology. This is, as stated by an electronics professor at my college SJCE, &lt;b&gt;TECHNO-POLITICS&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;The solution for this would be to make the data available in every ISPs own network. And that is precisely what the CDN - Content Delivery Network - companies do. These companies have a huge number or servers placed in various parts of the worlds. In most cases they are placed in the data centers of these ISPs. It is symbiosis. With CDNs placing their servers in ISP's data centers, the ISP has a lot of data in its own network, even though the original website (or content owner) might be using a different ISP. This avoids a lot of requests to different ISPs and there by reduce costs significantly. In return the CDN companies get a very sweet deal for the rack space for their machines &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-3743272122460206504?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/3743272122460206504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/10/isp-cat-and-mouse-game-and-cdns-finally.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/3743272122460206504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/3743272122460206504'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/10/isp-cat-and-mouse-game-and-cdns-finally.html' title='The ISP Cat and Mouse game and CDNs finally benefiting out of it.'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-6828434104664233002</id><published>2008-10-07T16:31:00.001+05:30</published><updated>2008-10-07T16:31:25.705+05:30</updated><title type='text'>Avoiding seeing your XP in the old pale Win 98 way</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;a href='http://www.mynetnuke.com/Blog/tabid/525/articleType/ArticleView/articleId/215/How-to-Fix-Windows-XP-Theme-Problems.aspx'&gt;How to Fix Windows XP Theme Problems &amp;gt; Tutorials, Bug Fixes, Subscriber Articles, Hosting DotNetNuke at Godaddy &amp;gt; My .NET Nuke Blog - Internet, Blogging, DotNetNuke, Tutorials, Windows, How to Articles, Fun, Free Stuff, Reviews&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;For some reason when I got my laptop my XP looked the good old Win 98 with the default grey color theme. I thought it was optimized for performance than for visual effects. Later when I actually wanted to see my machine in a beautiful way (Specially after decorating my FF with the Chromifox theme) I realized that the XP theme was not present in the drop down at all. My first thought was that it is some corporate limitation and cursed the rules and restrictions and all that. But I was sure I would not be the first person and hence hit our friend in need - Google. After wading through several pages telling me to download the default XP theme - Luna or a modified version of it I finally landed at the page linked at the top of the post. It gives clear steps to get back the charm on your XP machine and enjoy the beauty of today's computer instead of brooding over the past decade's sober ones.&lt;br/&gt;&lt;br/&gt;The particular thing that I had to do was to enable the Themes service. It was turned off and was set to manual activation. I changed to automatic start and voila !! -- my machine became beautiful and there by making my FF a lot more pleasing.&lt;br/&gt;Not jus that almost every application now appears beautiful including the MS-Outlook -- yeah, MS-Outlook.!!!&lt;br/&gt;&lt;blockquote/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-6828434104664233002?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/6828434104664233002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/10/avoiding-seeing-your-xp-in-old-pale-win.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6828434104664233002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6828434104664233002'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/10/avoiding-seeing-your-xp-in-old-pale-win.html' title='Avoiding seeing your XP in the old pale Win 98 way'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-8312287697102767931</id><published>2008-09-12T20:18:00.001+05:30</published><updated>2008-09-12T20:18:06.439+05:30</updated><title type='text'>Chrome multi-process architecture does have heavy costs</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;a href='http://blog.chromium.org/2008/09/multi-process-architecture.html'&gt;Chromium Blog: Multi-process Architecture&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;The day the Google Chrome comic was released quite a few people pinged and called me to talk about that and what I say about -- not that I am an expert on browsers or evaluating software products. Its just for the slight association with the Mozilla community that I was contacted. When I was talking with my roommate about this I told him what I felt the very moment I read about the multi-process architecture. Right from the first reading I was skeptical about the resource utilization if I were to open a hell lot of tabs in this browser, as it mentioned in the comic that each tab is a process. Though the phrase "process per tab" was more for software laymen with the actual thing being that it is "process per domain" until a max limit of about 20 and later its reuse. More details are on the blog post linked above.&lt;br/&gt;&lt;br/&gt;And about the reason for being skeptical is the very basic concept amongst computer users that more processes will slow down the system. Any system analyst or a sys-admin will tell you the same thing when you complain about the very low speed of your computer. From what I know this is mainly because of the increased memory consumption and a possible paging that might happen for moving processes in and out of main memory and virtual memory. Also scheduling will possibly take a hit as there are more processes. Apart from this as I understand there is always an overhead of maintaining process info for every process. &lt;br/&gt;&lt;br/&gt;Considering these things for a user like who opens close to 20 tabs always and goes up to 30 a lot of times, the overhead will be considerable. Also creating and killing processes will also be an overhead. &lt;br/&gt;&lt;br/&gt;Also my task-manager will list so many chrome.exe processes.. !!!!! Thats so very irritating for me.&lt;br/&gt;&lt;br/&gt;When I told him about my spkepticism he told me that the Google folks would have thought about that. I agreed with him and the now they have put it on their blog. In the post linked at the top, its mentioned that the system might slow down with a lot of processes and hence they had to put an upper limit and later resort for reuse. They call this small caveats but I am not sure if it is small enough. Lets see how things evolve.&lt;br/&gt;&lt;br/&gt;Until this is proven as small enough: Happy Single-Process browsing ;-)&lt;br/&gt;&lt;blockquote/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-8312287697102767931?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/8312287697102767931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/09/chrome-multi-process-architecture-does.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8312287697102767931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8312287697102767931'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/09/chrome-multi-process-architecture-does.html' title='Chrome multi-process architecture does have heavy costs'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-2363224382193103746</id><published>2008-08-30T02:49:00.002+05:30</published><updated>2008-08-30T02:57:34.850+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='IRC'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Networks'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>offline cache discussion with campd</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;[ 2:20 am]    &amp;lt;brahmana&amp;gt;    hi all,&lt;br /&gt;[ 2:20 am]    &amp;lt;brahmana&amp;gt;    Looks like my earlier question about offline cache got lost here...&lt;br /&gt;[ 2:21 am]    &amp;lt;brahmana&amp;gt;    I read the HTML 5 spec and understood that the cache will be versioned and hence multiple versions of the same cached element will be present on the client's disk. Is that so?&lt;br /&gt;[ 2:22 am]    &amp;lt;campd&amp;gt;    yeah&lt;br /&gt;[ 2:22 am]    &amp;lt;campd&amp;gt;    as of 3.1&lt;br /&gt;[ 2:22 am]    &amp;lt;campd&amp;gt;    in 3.0, there's only one version&lt;br /&gt;[ 2:23 am]    &amp;lt;brahmana&amp;gt;    ok..&lt;br /&gt;[ 2:23 am]    &amp;lt;campd&amp;gt;    brahmana: though they won't stick around long&lt;br /&gt;[ 2:23 am]    &amp;lt;brahmana&amp;gt;    ok..&lt;br /&gt;[ 2:23 am]    &amp;lt;campd&amp;gt;    brahmana: when you visit a page, it'll download a new version. Once any page using he old version is navigated away from, it is cleaned up&lt;br /&gt;[ 2:25 am]    &amp;lt;brahmana&amp;gt;    campd, So everytime the user goes online and visits a website which has offline cache, the cache is refreshed provided no page is using the old cache.&lt;br /&gt;[ 2:26 am]    &amp;lt;campd&amp;gt;    brahmana: sorta&lt;br /&gt;[ 2:26 am]    &amp;lt;campd&amp;gt;    brahmana: every time they visit an offline cached website&lt;br /&gt;[ 2:26 am]    &amp;lt;campd&amp;gt;    brahmana: it will check for a new version of the cache manifest&lt;br /&gt;[ 2:26 am]    &amp;lt;brahmana&amp;gt;    ok..&lt;br /&gt;[ 2:27 am]    &amp;lt;campd&amp;gt;    brahmana: if there's a new manifest, a new version of the cache will be created and fetched&lt;br /&gt;[ 2:27 am]    &amp;lt;brahmana&amp;gt;    campd, ok.. answers my question fully..&lt;br /&gt;[ 2:27 am]    &amp;lt;campd&amp;gt;    cool&lt;br /&gt;[ 2:27 am]    &amp;lt;brahmana&amp;gt;    campd, However I have another question..&lt;br /&gt;[ 2:27 am]    &amp;lt;campd&amp;gt;    ok&lt;br /&gt;[ 2:28 am]    &amp;lt;brahmana&amp;gt;    Now is this cache application specific? As in if a image with the same src is referenced by two websites, the image will be cached separately for each webapp?&lt;br /&gt;[ 2:28 am]    &amp;lt;campd&amp;gt;    yes.&lt;br /&gt;[ 2:29 am]    &amp;lt;brahmana&amp;gt;    ok..&lt;br /&gt;[ 2:30 am]    &amp;lt;brahmana&amp;gt;    campd, Will this offline cache in anyway affect the regular browsing when the user is online?&lt;br /&gt;[ 2:30 am]    &amp;lt;campd&amp;gt;    if they're online, browsing an offline app, it will be loaded from the cache first&lt;br /&gt;[ 2:30 am]    &amp;lt;campd&amp;gt;    it won't affect online browsing of non-offline pages&lt;br /&gt;[ 2:31 am]    &amp;lt;brahmana&amp;gt;    ok..&lt;br /&gt;[ 2:31 am]    &amp;lt;campd&amp;gt;    so if http://www.foo.com/offline.html is an offline app that references http://www.bar.com/another.html&lt;br /&gt;[ 2:31 am]    &amp;lt;campd&amp;gt;    going to http://www.bar.com/another.html will NOT load it from the offline cache&lt;br /&gt;[ 2:31 am]    &amp;lt;campd&amp;gt;    but going to http://www.foo.com/offline.html WILL be loaded from the offline cache&lt;br /&gt;[ 2:32 am]    &amp;lt;brahmana&amp;gt;    okay..&lt;br /&gt;[ 2:33 am]    &amp;lt;brahmana&amp;gt;    campd, Regarding the local storage, Can it be looked at as an extended form of what currently is cookie?&lt;br /&gt;[ 2:34 am]    &amp;lt;campd&amp;gt;    kinda, yeah&lt;br /&gt;[ 2:34 am]    &amp;lt;brahmana&amp;gt;    Is there any limit on the amount of data that each web-app gets on this local storage?&lt;br /&gt;[ 2:35 am]    &amp;lt;campd&amp;gt;    yep&lt;br /&gt;[ 2:35 am]    &amp;lt;brahmana&amp;gt;    Because the spec says that the web-app can use this to store user created _documents_&lt;br /&gt;[ 2:35 am]    &amp;lt;campd&amp;gt;    5 megs for the etld+1&lt;br /&gt;[ 2:35 am]    &amp;lt;campd&amp;gt;    if the domain has the offline-app permission it gets more, but I forget the exact number&lt;br /&gt;[ 2:35 am]    &amp;lt;mconnor&amp;gt;    campd: is that right? I thought I remembered some wacky combination thing&lt;br /&gt;[ 2:36 am]    &amp;lt;brahmana&amp;gt;    oh.. ok.. thats pretty big space..&lt;br /&gt;[ 2:36 am]    &amp;lt;campd&amp;gt;    (which I assume is the wacky combination mconnor's referring to ;))&lt;br /&gt;[ 2:36 am]    &amp;lt;mconnor&amp;gt;    no&lt;br /&gt;[ 2:36 am]    &amp;lt;mconnor&amp;gt;    it was something like "foo.bar.com can have 3 MB, and bar.com can have 2 MB" or something&lt;br /&gt;[ 2:36 am]    &amp;lt;mconnor&amp;gt;    in whatever combination&lt;br /&gt;[ 2:37 am]    &amp;lt;mconnor&amp;gt;    maybe that was the spec that got deprecated?&lt;br /&gt;[ 2:37 am]    &amp;lt;campd&amp;gt;    I think right now it's just "5 for the whole etld"&lt;br /&gt;[ 2:37 am]    &amp;lt;campd&amp;gt;    err, etld+1&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-2363224382193103746?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/2363224382193103746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/08/offline-cache-discussion-with-campd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2363224382193103746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2363224382193103746'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/08/offline-cache-discussion-with-campd.html' title='offline cache discussion with campd'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-6162019002579675657</id><published>2008-08-26T21:01:00.001+05:30</published><updated>2008-08-26T21:01:39.647+05:30</updated><title type='text'>Building and embedding spiderMonkey</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;If you already do not know, SpiderMonkey is the JavaScript engine of the Mozilla web browser. The interesting part about this JS engine is that you can use it in your application and execute JS from your application. Well I can talk a lot about the uses and the advantages of such an embeddable JS engine but thats for another post. Here I will tell you how to build SpiderMonkey and how to embed it in your application and finally how to get your application running with the JS engine.&lt;br/&gt;&lt;br/&gt;Actually the first two steps are very well explained in these MDC pages: &lt;br/&gt;&lt;br/&gt;http://developer.mozilla.org/En/Building_only_SpiderMonkey&lt;br/&gt;http://developer.mozilla.org/en/JavaScript_C_Engine_Embedder%27s_Guide&lt;br/&gt;&lt;br/&gt;&lt;ul&gt;&lt;li&gt;The first one tells you how to get SpiderMonkey and build it. It involves downloading the source and running "make -f Makefile.ref" and thats the end of the build story. You will have the engine binary, both in the form of a reusable library - dynamic and static and also an ready to use JS-execution shell. The reusable library is named libjs.so(dynamic) or libjs.a(static). The interactive JS-Shell will be an executable named js. More about using the Shell &lt;a href='http://developer.mozilla.org/en/Introduction_to_the_JavaScript_shell' target='_blank'&gt;here&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;br/&gt;&lt;ul&gt;&lt;li&gt;The second one tells you how to write a simple application using this reusable JS engine library. It also explains you the basic types used in the engine and the general essential terminologies. There is a boilerplate program also which you can use to test your first embedding attempt.&lt;/li&gt;&lt;/ul&gt;With all this great documentation, I was stuck at the point where I have to compile my application with the JS library. After the build I do not get any directory named "sdk" or something similar. It just gives me a build directory with a static library, a dynamic library and an executable. There are also a bunch of object files (.o files) but they are not really of much use. Only two .h files are copied to the object directory and that does not involve the main "jsapi.h" file. &lt;br/&gt;&lt;br/&gt;As a result you will end up with a hell lot of compilation errors if you just try to build your application. So there are a couple of steps, probably very evident ones, that you need to do before you build your app.&lt;br/&gt;&lt;br/&gt;&lt;ol&gt;&lt;li&gt;Put all the .h files, header files, from the source (src) directory in the include path when building your app. The best way for this would be to create a spidermonkey folder under the includes directory or your app and providing that directory as the include path to the compiler at build time.&lt;/li&gt;&lt;li&gt;Copy the libjs.so to the lib directory of your application and pass it as a linker option (-ljs).&lt;/li&gt;&lt;li&gt;The various JS script types map to some system types, probably, based on the OS being used and hence they are present under some #ifdef. If you do not define any OS then you will not get defintions for several types and you end up with compilation errors. To avoid this manually define the OS before you include the first file from spiderMonkey (which is typically jsapi.h). Defining is in the usual way: #define XP_UNIX  // -- For linux systems.&lt;/li&gt;&lt;/ol&gt;With this you should be able to build your application and run it. So you now have a program of yours for which input can be JavaScript and it will compile and run that JS and give you the output. &lt;br/&gt;&lt;br/&gt;Happy embedding. :-)&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-6162019002579675657?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/6162019002579675657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/08/building-and-embedding-spidermonkey.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6162019002579675657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6162019002579675657'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/08/building-and-embedding-spidermonkey.html' title='Building and embedding spiderMonkey'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-1252341258531594978</id><published>2008-08-26T20:31:00.000+05:30</published><updated>2010-10-15T04:00:13.606+05:30</updated><title type='text'>Amazing pitfall, you will laugh</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;This is one of those funny videos for which I really laughed...  Watch this and let me know if you did not laugh... &lt;br/&gt;&lt;br/&gt;Specially, the lungi is the added attraction.. :D &lt;br/&gt;&lt;br/&gt;&lt;div class='youtube-video'&gt;&lt;object width='425' height='350'&gt; &lt;param value='http://www.youtube.com/v/SpJjoneWcxA' name='movie'&gt; &lt;/param&gt; &lt;embed width='425' height='350' type='application/x-shockwave-flash' src='http://www.youtube.com/v/SpJjoneWcxA'&gt; &lt;/embed&gt;  &lt;/object&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-1252341258531594978?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/1252341258531594978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/08/amazing-pitfall-you-will-laugh.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1252341258531594978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1252341258531594978'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/08/amazing-pitfall-you-will-laugh.html' title='Amazing pitfall, you will laugh'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-4140378824044020376</id><published>2008-08-17T04:45:00.001+05:30</published><updated>2008-08-17T04:47:06.697+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='JS'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='DLL'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>How libffi actually works?</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I came across this libffi when I thought of working on js-ctypes. Though my contribution remained very close to nil, I got to know about this fantastic new thing libffi. But I did not understand how it actually worked when I first read. I just got a high overview and assumed that the library abstracts out several things that I need not worry about when making calls across different programming languages. I just followed the usage instructions and started looking at the js-ctypes code. That was sufficient to understand the js-ctypes code. But today when I was once again going through the &lt;a href='http://svn.mozilla.org/projects/js-ctypes/trunk/js-ctypes/src/linux/README'&gt;README&lt;/a&gt;, I actually came across one line that made things a little more clearer. The first paragraph in "What is libffi?" tells it all. Its the calling conventions that this library exploits. I had written a &lt;a href='http://techbrahmana.blogspot.com/2007/12/calling-conventions.html'&gt;post about calling conventions&lt;/a&gt; some time back. As mentioned in the readme file, its the calling convention whcih is the guiding light for the compiler. So when generating the binary code, thecompiler will assume will that the arguments that are being passed to that function will be available in some place and also it knows about a place where the return value will be kept, so that the code from the calling function will know where to look for it.&lt;br/&gt;&lt;br/&gt;Now we know that the ultimate binary code that we get after compilation is the machine code. So it is basically a set of machine supported instructions. These instructions are certainly not as sophisticated as those available in the C - like the functions. So what do these functions transalte to? Nothing but a jump of IP(instruction pointer) to an address where the binary code of that function is. Inside this code, the arguments passed are accessed by referencing some memory location. During compilation the compiler will not know the precise memory locations (obviously). But the compiler has to put in some address there when generating the code. How does it decides on the memory location? This is where the calling conventions come into picture. The compiler follows these standard steps. Since its the compiler who is generating the code for both calling a function, where arguments are sent, and the code of the called function, where those args are received, the compiler will be knowing where it has put the arguments and hence generate code to use the data in those locations. From this point of view, the main(or is it the only one) condition for the binary code of a function to work properly is to have its arguments in the memory locations it thinks they are in and and the end place back the return value in the right location. And from what I have understood till now, it is this point that libffi exploits.&lt;br/&gt;&lt;br/&gt;When we are forwarding calls from an interpreted language, like JS, to some binary code generated from a compiled language, like C, there are two things to be done:&lt;br/&gt;&lt;br/&gt;0. As discussed earlier, whatever arguments are passed from JS are to be placed in the right locations and later take the return value and give it back to JS.&lt;br/&gt;1. Type conversions -- The types used by JS are not understood by C. So someone should rise up to the occasion and map these JS types to their C counterparts and vice-versa.&lt;br/&gt;&lt;br/&gt;The first of these is taken care by libffi. But the second one is very context specific and totally depends on the interpreted language. It does not make sense to just have a catalog of type convertors for every interpreted language on this earth. So these two steps were separated and spread out as two interacting layers between the binary code and the interpreted language code. libffi now takes care of the calling convention part and making sure the binary code runs and gives back the results. And the job of type conversion is the job of another layer which is specific to the interpreted language which wants to call into the binary code. And hence we have these different type converting layers for different interpreted languages: ctypes for python, js-ctypes for JS (and probably some more exist). Well with this renewed and clearer understanding I hope to actually contribute to js-ctypes.&lt;br/&gt;&lt;br/&gt;Happy calling (with conventions) ;-)&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-4140378824044020376?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/4140378824044020376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/08/how-libffi-actually-works.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4140378824044020376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4140378824044020376'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/08/how-libffi-actually-works.html' title='How libffi actually works?'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-1710724127948457576</id><published>2008-08-14T23:53:00.000+05:30</published><updated>2010-10-15T04:00:13.623+05:30</updated><title type='text'>Something good even duirng these rough patches in market</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;a href='http://www.valueresearchonline.com/story/h2_storyView.asp?str=11735'&gt;Value Research: The Complete Guide to Mutual Funds&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;This website, valuereasearchonline, comes up with some analysis that is new to me almost every time. This is particularly stuck me because, the tool mentioned in this article and the message that it drives has got something to do beyond the markets.&lt;br/&gt;&lt;br/&gt;If we can have a method to take advantage of the current volatility, irrespective of whether the markets go down or up, then we should remind ourselves of the good old statement: "Where there is a will there is a way".&lt;br/&gt;&lt;br/&gt;Just read this up and you will feel better after the big downfall of yesterday and today. :-)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;blockquote/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-1710724127948457576?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/1710724127948457576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/08/something-good-even-duirng-these-rough.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1710724127948457576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1710724127948457576'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/08/something-good-even-duirng-these-rough.html' title='Something good even duirng these rough patches in market'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-5489170458262379911</id><published>2008-08-14T23:25:00.001+05:30</published><updated>2008-08-14T23:25:27.260+05:30</updated><title type='text'>Kaminsky DNS Vulnerability</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;a href='http://www.unixwiz.net/techtips/iguide-kaminsky-dns-vuln.html'&gt;An Illustrated Guide to the Kaminsky DNS Vulnerability&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;With twitter, I have almost stopped blogging. But this was something that needed more than 140 chars. So here is another &lt;b&gt;blog&lt;/b&gt; post.&lt;br/&gt;This thing has been making rounds in the web security world for quite some time now. This in fact appeared in the Times of India newspaper recently. The article there mentioned about the sudden patching that the nameservers were going through. This security hole is indeed that serious. With this exploit an attacker can get hold of a complete domain and become an authoritative nameserver for that domain. So any request to resolve name for the hijacked domain can be directed to the attacker's machine.&lt;br/&gt;&lt;br/&gt;Now imagine this happening to the most popular online banking website. Yes, things can be very creepy on the internet.&lt;br/&gt;&lt;br/&gt;To clearly understand how this attack can happen and how it can be prevented read on the the illustrative guide linked at the beginning of the post. Doesn't matter even if you don't know how DNS works. The illustrative guide explains several things satisfactorily.&lt;br/&gt;&lt;br/&gt;Happy Resolving ;-)&lt;br/&gt;&lt;br/&gt;&lt;blockquote/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-5489170458262379911?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/5489170458262379911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/08/kaminsky-dns-vulnerability.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5489170458262379911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5489170458262379911'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/08/kaminsky-dns-vulnerability.html' title='Kaminsky DNS Vulnerability'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-1877277693525984966</id><published>2008-07-28T15:43:00.000+05:30</published><updated>2010-10-15T04:00:13.641+05:30</updated><title type='text'>Basic sciences coming alive in applets</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;a href='http://www.falstad.com/mathphysics.html'&gt;Math, Physics, and Engineering Applets&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;Happy appleting, ;-)&lt;br/&gt;&lt;br/&gt;&lt;blockquote/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-1877277693525984966?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/1877277693525984966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/basic-sciences-coming-alive-in-applets.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1877277693525984966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1877277693525984966'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/basic-sciences-coming-alive-in-applets.html' title='Basic sciences coming alive in applets'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-895746565838543655</id><published>2008-07-28T15:18:00.000+05:30</published><updated>2010-10-15T04:00:13.660+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='thoughts'/><category scheme='http://www.blogger.com/atom/ns#' term='gyaan'/><category scheme='http://www.blogger.com/atom/ns#' term='memories'/><category scheme='http://www.blogger.com/atom/ns#' term='hostel'/><category scheme='http://www.blogger.com/atom/ns#' term='career'/><title type='text'>And I became the nomad...!!!</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;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.&lt;br/&gt;&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;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&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;Whatever it may be, as of now, I am a NOMAD --- I have become the nomad.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-895746565838543655?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/895746565838543655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/and-i-became-nomad.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/895746565838543655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/895746565838543655'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/and-i-became-nomad.html' title='And I became the nomad...!!!'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-1486562595407508792</id><published>2008-07-23T23:28:00.001+05:30</published><updated>2008-07-23T23:28:38.335+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='IRC'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Discussion with biesi, bz and gavin about channel and tabId in #developers</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;brahmana    wonders if biesi was able to examine the UML diagrams&lt;br/&gt;&lt;br/&gt;[ 8:24 pm]    &amp;lt;biesi&amp;gt;    brahmana, sorry not yet&lt;br/&gt;[ 8:24 pm]    &amp;lt;brahmana&amp;gt;    thought so..&lt;br/&gt;[ 8:24 pm]    &amp;lt;brahmana&amp;gt;    biesi, anyways another quick question.&lt;br/&gt;[ 8:25 pm]    &amp;lt;biesi&amp;gt;    brahmana, yes?&lt;br/&gt;[ 8:26 pm]    &amp;lt;brahmana&amp;gt;    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.&lt;br/&gt;[ 8:26 pm]    &amp;lt;brahmana&amp;gt;    ?&lt;br/&gt;&lt;br/&gt;[ 8:26 pm]    &amp;lt;brahmana&amp;gt;    biesi, I want to know where I will have access to both of them.&lt;br/&gt;[ 8:27 pm]    &amp;lt;timeless&amp;gt;    brahmana: pretty&lt;br/&gt;&lt;br/&gt;[ 8:27 pm]    &amp;lt;biesi&amp;gt;    brahmana, um&lt;br/&gt;&lt;br/&gt;[ 8:28 pm]    &amp;lt;biesi&amp;gt;    brahmana, nothing in that diagram has access to both :-)&lt;br/&gt;[ 8:28 pm]    &amp;lt;brahmana&amp;gt;    timeless, thank you.. more here: http://wiki.mozilla.org/User:Brahmana/Netwerk_Docs (just in case)&lt;br/&gt;&lt;br/&gt;[ 8:29 pm]    &amp;lt;brahmana&amp;gt;    biesi, ok.. so how much prior to webBrowser will I have to go to get a tabID ?&lt;br/&gt;[ 8:29 pm]    &amp;lt;biesi&amp;gt;    brahmana, tabbrowser.xml&lt;br/&gt;&lt;br/&gt;[ 8:29 pm]    &amp;lt;biesi&amp;gt;    its loadURI function or something like that&lt;br/&gt;&lt;br/&gt;[ 8:29 pm]    &amp;lt;biesi&amp;gt;    brahmana, of course some things call loadURI on the web navigation directly...&lt;br/&gt;&lt;br/&gt;[ 8:29 pm]    &amp;lt;brahmana&amp;gt;    biesi, yeah.. thats how I created that sequence diagram..&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[ 8:30 pm]    &amp;lt;brahmana&amp;gt;    biesi, Can't I get hold of the tabID in C++ ?&lt;br/&gt;[ 8:30 pm]    &amp;lt;biesi&amp;gt;    C++ has no concept of "tab"&lt;br/&gt;[ 8:31 pm]    &amp;lt;brahmana&amp;gt;    But the &amp;lt;browser&amp;gt; present in each tab corresponds to one nsIWebBrowser, isn't it?&lt;br/&gt;[ 8:31 pm]    &amp;lt;brahmana&amp;gt;    &amp;lt;browser&amp;gt; == the xul browser element&lt;br/&gt;&lt;br/&gt;[ 8:35 pm]    &amp;lt;biesi&amp;gt;    brahmana, no&lt;br/&gt;[ 8:35 pm]    &amp;lt;biesi&amp;gt;    there is no nsIWebBrowser in firefox&lt;br/&gt;[ 8:36 pm]    &amp;lt;biesi&amp;gt;    that's only used for embedding&lt;br/&gt;[ 8:36 pm]    &amp;lt;timeless&amp;gt;    unfortunately we don't use the same apis everywhere :(&lt;br/&gt;[ 8:37 pm]    &amp;lt;brahmana&amp;gt;    oh man..&lt;br/&gt;[ 8:37 pm]    &amp;lt;biesi&amp;gt;    brahmana, there is one docshell per tab&lt;br/&gt;[ 8:37 pm]    &amp;lt;brahmana&amp;gt;    then the starting of my sequence diagram is wrong..&lt;br/&gt;[ 8:37 pm]    &amp;lt;biesi&amp;gt;    if that helps you&lt;br/&gt;[ 8:37 pm]    &amp;lt;brahmana&amp;gt;    yeah.. I am aware of that..&lt;br/&gt;[ 8:38 pm]    &amp;lt;brahmana&amp;gt;    and I thought it was nsWebBrowser that held a reference to a docShell and made calls on the docShell&lt;br/&gt;[ 8:38 pm]    &amp;lt;biesi&amp;gt;    ah, no&lt;br/&gt;[ 8:38 pm]    &amp;lt;brahmana&amp;gt;    But as it appears firefox does not use nsWebBrowser itself...&lt;br/&gt;[ 8:38 pm]    &amp;lt;biesi&amp;gt;    the browser holds the docshell directly, I believe&lt;br/&gt;[ 8:39 pm]    &amp;lt;brahmana&amp;gt;    you mean the xul browser ?&lt;br/&gt;[ 8:39 pm]    &amp;lt;biesi&amp;gt;    yeah&lt;br/&gt;[ 8:39 pm]    &amp;lt;brahmana&amp;gt;    What C++ object does that map to?&lt;br/&gt;[ 8:39 pm]    &amp;lt;brahmana&amp;gt;    something under widgets?&lt;br/&gt;[ 8:39 pm]    &amp;lt;biesi&amp;gt;    the xul browser?&lt;br/&gt;[ 8:39 pm]    &amp;lt;brahmana&amp;gt;    yeah&lt;br/&gt;[ 8:40 pm]    &amp;lt;biesi&amp;gt;    um&lt;br/&gt;[ 8:40 pm]    &amp;lt;biesi&amp;gt;    some xul magic&lt;br/&gt;[ 8:40 pm]    &amp;lt;biesi&amp;gt;    nsXULElement.cpp perhaps&lt;br/&gt;[ 8:40 pm]    &amp;lt;brahmana&amp;gt;    oh.. let me see&lt;br/&gt;[ 8:40 pm]    &amp;lt;biesi&amp;gt;    via the boxObject maybe?&lt;br/&gt;[ 8:41 pm]    &amp;lt;biesi&amp;gt;    but note that the &amp;lt;browser&amp;gt; is mostly an XBL thingy&lt;br/&gt;[ 8:41 pm]    &amp;lt;brahmana&amp;gt;    oh man.. this is getting heavily complex..&lt;br/&gt;[ 8:41 pm]    &amp;lt;timeless&amp;gt;    it really is&lt;br/&gt;&lt;br/&gt;[ 8:43 pm]    &amp;lt;brahmana&amp;gt;    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?&lt;br/&gt;[ 8:45 pm]    * brahmana    requests to put aside the XPCOM stuff that happens in the above sequence..&lt;br/&gt;[ 8:45 pm]    &amp;lt;brahmana&amp;gt;    sorry, the XPConnect stuff..&lt;br/&gt;[ 8:46 pm]    &amp;lt;gavin|&amp;gt;    yes&lt;br/&gt;[ 8:46 pm]    &amp;lt;gavin|&amp;gt;    though the nsXULElement isn't really involved&lt;br/&gt;[ 8:46 pm]    &amp;lt;gavin|&amp;gt;    apart from being associated with the JS object that implements the XBL methods&lt;br/&gt;[ 8:48 pm]    &amp;lt;brahmana&amp;gt;    gavin|, Can you please elaborate a little on your last statement..&lt;br/&gt;[ 8:48 pm]    &amp;lt;brahmana&amp;gt;    ?&lt;br/&gt;[ 8:49 pm]    &amp;lt;brahmana&amp;gt;    Or is there a doc that I can read up to orient myself a little before asking lots of questions here?&lt;br/&gt;[ 8:49 pm]    &amp;lt;gavin|&amp;gt;    nsXULElement itself doesn't have anything to do with the XBL implemented methods&lt;br/&gt;[ 8:50 pm]    &amp;lt;gavin|&amp;gt;    it's just a "container"&lt;br/&gt;[ 8:51 pm]    &amp;lt;gavin|&amp;gt;    it's not really useful to say that you're interacting with a nsXULElement, because you're really interacting with an XBL bound node&lt;br/&gt;[ 8:51 pm]    &amp;lt;gavin|&amp;gt;    and the XBL &amp;lt;browser&amp;gt; methods implemented in JS are what matters&lt;br/&gt;[ 8:51 pm]    &amp;lt;gavin|&amp;gt;    not the nsXULElement class methods&lt;br/&gt;[ 8:52 pm]    &amp;lt;brahmana&amp;gt;    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?&lt;br/&gt;[ 8:53 pm]    &amp;lt;gavin|&amp;gt;    that's about right&lt;br/&gt;[ 8:55 pm]    &amp;lt;brahmana&amp;gt;    now this XBL/JS implementation is present in tabbrowser.xml?&lt;br/&gt;[ 8:56 pm]    &amp;lt;gavin|&amp;gt;    and browser.xml, yeah&lt;br/&gt;[ 8:56 pm]    &amp;lt;gavin|&amp;gt;    the tabbrowser contains &amp;lt;browser&amp;gt;s&lt;br/&gt;&lt;br/&gt;[ 8:57 pm]    &amp;lt;brahmana&amp;gt;    This is the one I should be looking at: http://mxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/browser.xml , right?&lt;br/&gt;&lt;br/&gt;[ 8:58 pm]    &amp;lt;gavin|&amp;gt;    yes&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[ 9:04 pm]    &amp;lt;brahmana&amp;gt;    gavin|, ok.. i figured the exit point to docShell: http://mxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/browser.xml#186 --&lt;br/&gt;[ 9:04 pm]    &amp;lt;brahmana&amp;gt;    Now I want to get the tabId in which this browser object is, how would I achieve it?&lt;br/&gt;&lt;br/&gt;[ 9:04 pm]    &amp;lt;gavin|&amp;gt;    brahmana: not sure what you mean by "tabId"&lt;br/&gt;[ 9:05 pm]    &amp;lt;brahmana&amp;gt;    tabIndex, the index of the tab in the tabContainer&lt;br/&gt;[ 9:05 pm]    &amp;lt;gavin|&amp;gt;    you have a reference to a &amp;lt;browser&amp;gt;, and want to find which tab it's in?&lt;br/&gt;[ 9:06 pm]    &amp;lt;brahmana&amp;gt;    yes..&lt;br/&gt;[ 9:06 pm]    &amp;lt;brahmana&amp;gt;    well actually I am inside the browser's definition itself..&lt;br/&gt;[ 9:06 pm]    &amp;lt;gavin|&amp;gt;    I guess you you need to loop through tabs and compare against their .linkedBrowser&lt;br/&gt;[ 9:06 pm]    &amp;lt;gavin|&amp;gt;    don't think there's a utility method to do that&lt;br/&gt;[ 9:07 pm]    &amp;lt;brahmana&amp;gt;    ok.. let me see how I can accomplish that..&lt;br/&gt;[ 9:08 pm]    &amp;lt;brahmana&amp;gt;    I am thinking this... for(i=0; i &amp;lt; this.parentNode.browsers.length; ++i) if(this.parentNode.browsers[i] == this) return i&lt;br/&gt;[ 9:09 pm]    &amp;lt;brahmana&amp;gt;    that must work, isn't it?&lt;br/&gt;[ 9:09 pm]    &amp;lt;gavin|&amp;gt;    probably&lt;br/&gt;[ 9:09 pm]    &amp;lt;gavin|&amp;gt;    assuming this.parentNode is the tabbrowser&lt;br/&gt;[ 9:09 pm]    &amp;lt;brahmana&amp;gt;    yeah.. I verified that..&lt;br/&gt;[ 9:09 pm]    &amp;lt;gavin|&amp;gt;    though the "browsers" getter builds an array by looping through taqbs&lt;br/&gt;[ 9:09 pm]    &amp;lt;gavin|&amp;gt;    so it would best be avoided&lt;br/&gt;[ 9:09 pm]    &amp;lt;gavin|&amp;gt;    to avoid having to loop twice&lt;br/&gt;[ 9:10 pm]    &amp;lt;brahmana&amp;gt;    oh.. instead we directly loop through the tabs..&lt;br/&gt;[ 9:10 pm]    &amp;lt;gavin|&amp;gt;    yeah&lt;br/&gt;[ 9:10 pm]    &amp;lt;gavin|&amp;gt;    http://mxr.mozilla.org/seamonkey/source/browser/base/content/tabbrowser.xml#1693&lt;br/&gt;&lt;br/&gt;[ 9:11 pm]    &amp;lt;brahmana&amp;gt;    And if i change the XBL now, is there anything that I need to do during the build?&lt;br/&gt;[ 9:11 pm]    &amp;lt;gavin|&amp;gt;    you just need to rebuild browser/&lt;br/&gt;[ 9:11 pm]    &amp;lt;gavin|&amp;gt;    (or toolkit/ if you're touching browser.xml&lt;br/&gt;[ 9:12 pm]    &amp;lt;gavin|&amp;gt;    why are you changing them, though?&lt;br/&gt;[ 9:12 pm]    &amp;lt;brahmana&amp;gt;    ok.. thats great.. i can even go for a full build.. :-)&lt;br/&gt;&lt;br/&gt;[ 9:12 pm]    &amp;lt;brahmana&amp;gt;    I want to associate every channel with the tab it is working for..&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[ 9:14 pm]    &amp;lt;gavin|&amp;gt;    brahmana: is therea bug # for this?&lt;br/&gt;[ 9:15 pm]    &amp;lt;brahmana&amp;gt;    gavin|, oh no.. there isn't.. I saw similar thing in Firebug, Cookie Manager and wanted to explore on that..&lt;br/&gt;[ 9:15 pm]    &amp;lt;brahmana&amp;gt;    if by any means this is a desirable thing we can have a bug...&lt;br/&gt;&lt;br/&gt;[ 9:24 pm]    &amp;lt;brahmana&amp;gt;    Is the code under xpfe/ still used?&lt;br/&gt;[ 9:25 pm]    &amp;lt;gavin|&amp;gt;    some of it is&lt;br/&gt;[ 9:25 pm]    &amp;lt;brahmana&amp;gt;    the window mediator?&lt;br/&gt;[ 9:25 pm]    &amp;lt;gavin|&amp;gt;    yes&lt;br/&gt;&lt;br/&gt;[ 9:26 pm]    &amp;lt;brahmana&amp;gt;    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?&lt;br/&gt;[ 9:26 pm]    &amp;lt;gavin|&amp;gt;    right&lt;br/&gt;[ 9:27 pm]    &amp;lt;bz&amp;gt;    tabindices need not be unique within a single window either&lt;br/&gt;[ 9:28 pm]    &amp;lt;gavin|&amp;gt;    er, why wouldn't they be?&lt;br/&gt;[ 9:28 pm]    &amp;lt;brahmana&amp;gt;    oh.. well if we do not open and close stuff, they should be right?&lt;br/&gt;[ 9:28 pm]    &amp;lt;bz&amp;gt;    because they're under the control of the page author?&lt;br/&gt;[ 9:28 pm]    &amp;lt;bz&amp;gt;    And nothing prevents an HTML author from sticking tabindex="2" on every single node in the document&lt;br/&gt;[ 9:28 pm]    &amp;lt;gavin|&amp;gt;    we're talking browser tabs&lt;br/&gt;[ 9:28 pm]    &amp;lt;bz&amp;gt;    oh&lt;br/&gt;[ 9:29 pm]    &amp;lt;bz&amp;gt;    nevermind, then&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[ 9:31 pm]    &amp;lt;brahmana&amp;gt;    gavin|, And about the bug for the stuff I am asking, I assume this isn't really a desired feature, is it?&lt;br/&gt;&lt;br/&gt;[ 9:31 pm]    &amp;lt;gavin|&amp;gt;    brahmana: I still don't really know what the feature is&lt;br/&gt;&lt;br/&gt;[ 9:35 pm]    &amp;lt;brahmana&amp;gt;    gavin|, To observe requests for one tab in observerservice ... there is requirement for coupling tab index with the http channel....&lt;br/&gt;&lt;br/&gt;[ 9:35 pm]    &amp;lt;brahmana&amp;gt;    And that is what I am trying to accomplish, associate the tabIndex with the channel..&lt;br/&gt;&lt;br/&gt;[ 9:37 pm]    &amp;lt;bz&amp;gt;    brahmana: er.... you know the docshell involved in both places, right?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[ 9:39 pm]    &amp;lt;brahmana&amp;gt;    bz, yeah.. I was talking to gavin and others about the way browser interacts with docShell. But I did not fully understand your question.&lt;br/&gt;[ 9:39 pm]    &amp;lt;brahmana&amp;gt;    browser as in the xul browser element.&lt;br/&gt;&lt;br/&gt;[ 9:40 pm]    &amp;lt;bz&amp;gt;    brahmana: docshell is he guts of a browser&lt;br/&gt;[ 9:40 pm]    &amp;lt;bz&amp;gt;    brahmana: the part that actually holds the web page, etc&lt;br/&gt;&lt;br/&gt;[ 9:41 pm]    &amp;lt;brahmana&amp;gt;    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..&lt;br/&gt;&lt;br/&gt;[ 9:43 pm]    &amp;lt;bz&amp;gt;    ok&lt;br/&gt;[ 9:43 pm]    &amp;lt;bz&amp;gt;    so you can get from a tab to a docshell&lt;br/&gt;[ 9:43 pm]    &amp;lt;bz&amp;gt;    you can get from the channel to a docshell (usually)&lt;br/&gt;[ 9:43 pm]    &amp;lt;bz&amp;gt;    then compare the two&lt;br/&gt;[ 9:43 pm]    &amp;lt;bz&amp;gt;    for images you're out of luck&lt;br/&gt;[ 9:45 pm]    &amp;lt;biesi&amp;gt;    brahmana, there can be a &amp;lt;browser&amp;gt; that's not part of a &amp;lt;tabbrowser&amp;gt;&lt;br/&gt;[ 9:46 pm]    &amp;lt;brahmana&amp;gt;    bz, Whats special about the images?&lt;br/&gt;[ 9:46 pm]    &amp;lt;biesi&amp;gt;    what's NOT special about images&lt;br/&gt;[ 9:46 pm]    &amp;lt;bz&amp;gt;    brahmana: they don't so much follow necko rules&lt;br/&gt;[ 9:46 pm]    &amp;lt;brahmana&amp;gt;    biesi, Are you referring to a situation with single tab?&lt;br/&gt;&lt;br/&gt;[ 9:47 pm]    &amp;lt;brahmana&amp;gt;    bz, biesi yeah I had got the same statement when discussing about the request end notifications..&lt;br/&gt;[ 9:47 pm]    &amp;lt;biesi&amp;gt;    brahmana, no, I'm referring to extensions or mailnews or whatever that doesn't support tabs&lt;br/&gt;[ 9:47 pm]    &amp;lt;brahmana&amp;gt;    biesi, oh well.. that is probably not a problem. I don't think we would go beyond firefox.&lt;br/&gt;[ 9:48 pm]    &amp;lt;biesi&amp;gt;    ok&lt;br/&gt;[ 9:48 pm]    &amp;lt;biesi&amp;gt;    I have no idea what you're trying to do&lt;br/&gt;[ 9:48 pm]    * bz    points to "extensions"&lt;br/&gt;[ 9:48 pm]    &amp;lt;bz&amp;gt;    anyway&lt;br/&gt;[ 9:48 pm]    &amp;lt;biesi&amp;gt;    I'm just saying, if you want to change browser.xml in mozilla.org&lt;br/&gt;[ 9:48 pm]    &amp;lt;biesi&amp;gt;    's repository, you can't assume that there's a tabbrowser&lt;br/&gt;[ 9:49 pm]    &amp;lt;brahmana&amp;gt;    point fully accepted.. :-)&lt;br/&gt;[ 9:50 pm]    &amp;lt;brahmana&amp;gt;    bz, I am not sure about getting to a docShell from a channel. Is there is straight forward way?&lt;br/&gt;[ 9:51 pm]    &amp;lt;brahmana&amp;gt;    s/there is/there a&lt;br/&gt;&lt;br/&gt;[ 9:54 pm]    &amp;lt;brahmana&amp;gt;    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?&lt;br/&gt;[ 9:55 pm]    &amp;lt;bz&amp;gt;    brahmana: the docshell is the channel's loadgroup's notification callbacks&lt;br/&gt;[ 9:55 pm]    &amp;lt;bz&amp;gt;    brahmana: generally&lt;br/&gt;[ 9:55 pm]    &amp;lt;bz&amp;gt;    brahmana: we're talking about a channel having a reference to the docshell, not the other way around&lt;br/&gt;&lt;br/&gt;[ 9:57 pm]    &amp;lt;biesi&amp;gt;    the load group has the channels/requests for all the loads&lt;br/&gt;[ 9:57 pm]    &amp;lt;biesi&amp;gt;    except for iframes of course&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[10:00 pm]    &amp;lt;brahmana&amp;gt;    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?&lt;br/&gt;[10:01 pm]    &amp;lt;bz&amp;gt;    "change" in what sense?&lt;br/&gt;[10:01 pm]    &amp;lt;biesi&amp;gt;    the connection is not set up yet&lt;br/&gt;[10:01 pm]    &amp;lt;biesi&amp;gt;    but you can't change the URL&lt;br/&gt;[10:01 pm]    * bz    really wishes URIs were immutable and that channels' URI were readonly so people wouldn't ask questions like this&lt;br/&gt;[10:01 pm]    &amp;lt;biesi&amp;gt;    the channel's URI IS readonly&lt;br/&gt;[10:01 pm]    &amp;lt;brahmana&amp;gt;    ok.. :-)&lt;br/&gt;[10:01 pm]    &amp;lt;bz&amp;gt;    ah, good&lt;br/&gt;&lt;br/&gt;[10:01 pm]    &amp;lt;bz&amp;gt;    well, that URIs were immutable, then&lt;br/&gt;[10:02 pm]    &amp;lt;bz&amp;gt;    I thought we were gonna do that for http sometime&lt;br/&gt;[10:02 pm]    &amp;lt;bz&amp;gt;    flip the bit&lt;br/&gt;[10:02 pm]    * brahmana    decides not to ask such questions to be compliant with bz's wishes..&lt;br/&gt;[10:02 pm]    &amp;lt;bz&amp;gt;    (and see what breaks)&lt;br/&gt;[10:02 pm]    &amp;lt;biesi&amp;gt;    oh we aren't? that sucks :/&lt;br/&gt;[10:02 pm]    &amp;lt;bz&amp;gt;    well&lt;br/&gt;[10:02 pm]    &amp;lt;bz&amp;gt;    we're not _yet_&lt;br/&gt;[10:02 pm]    &amp;lt;bz&amp;gt;    I also wish URIs were immutable by default instead of the nsIMutable mess..&lt;br/&gt;[10:02 pm]    &amp;lt;bz&amp;gt;    but then again, I could use a pony too&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[10:02 pm]    &amp;lt;bz&amp;gt;    Or better yet, a kayak&lt;br/&gt;[10:02 pm]    &amp;lt;bz&amp;gt;    it is?&lt;br/&gt;[10:03 pm]    * bz    looks in his "to check in" folder&lt;br/&gt;[10:03 pm]    &amp;lt;biesi&amp;gt;    there's so much stuff that I'd like to change if I could...&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-1486562595407508792?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/1486562595407508792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/discussion-with-biesi-bz-and-gavin.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1486562595407508792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1486562595407508792'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/discussion-with-biesi-bz-and-gavin.html' title='Discussion with biesi, bz and gavin about channel and tabId in #developers'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-5206085291838658388</id><published>2008-07-22T21:35:00.001+05:30</published><updated>2008-07-22T21:35:20.559+05:30</updated><title type='text'>AwesomeBar for awesome browser</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;a href='http://ed.agadak.net/2007/11/smartbar-to-awesomebar'&gt;SmartBar to AwesomeBar | edilee&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;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.. :-)&lt;br/&gt;&lt;br/&gt;Happy Awseoming.. :-)&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;Brahmana.&lt;br/&gt;&lt;blockquote/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-5206085291838658388?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/5206085291838658388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/awesomebar-for-awesome-browser.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5206085291838658388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5206085291838658388'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/awesomebar-for-awesome-browser.html' title='AwesomeBar for awesome browser'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-7665767563293538957</id><published>2008-07-21T15:19:00.000+05:30</published><updated>2010-10-15T04:00:13.675+05:30</updated><title type='text'>A simple and practical green way of life</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;br/&gt;Read this: &lt;a href='http://www.morganstanley.com/about/community/littlegreenebook/'&gt;greenbook_public&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;Brahmana.&lt;br/&gt;&lt;blockquote/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-7665767563293538957?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/7665767563293538957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/simple-and-practical-green-way-of-life.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/7665767563293538957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/7665767563293538957'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/simple-and-practical-green-way-of-life.html' title='A simple and practical green way of life'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-1764301801173763123</id><published>2008-07-21T14:54:00.000+05:30</published><updated>2010-10-15T04:00:13.693+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gyaan'/><category scheme='http://www.blogger.com/atom/ns#' term='tech-also'/><category scheme='http://www.blogger.com/atom/ns#' term='career'/><title type='text'>Aren't you proud to be a programmer?!</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;br/&gt;Read this: &lt;a href='http://duartes.org/gustavo/blog/post/lucky-to-be-a-programmer'&gt;Lucky to be a Programmer : Gustavo Duarte&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;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" ;-).&lt;br/&gt;&lt;br/&gt;Go ahead and read that one.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;Brahmana.&lt;br/&gt;&lt;blockquote/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-1764301801173763123?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/1764301801173763123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/aren-you-proud-to-be-programmer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1764301801173763123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1764301801173763123'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/aren-you-proud-to-be-programmer.html' title='Aren&amp;#39;t you proud to be a programmer?!'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-6193872581929022621</id><published>2008-07-15T18:38:00.001+05:30</published><updated>2008-07-15T18:38:20.515+05:30</updated><title type='text'>Doxygen - Yet another technical wonder</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;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.&lt;br/&gt;&lt;br/&gt;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 &amp;amp; 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.&lt;br/&gt;&lt;br/&gt;I am now a big fan of doxygen. It is indeed "Oxygen for docs". Go ahead and try it out. It is available &lt;a href='http://www.stack.nl/%7Edimitri/doxygen/download.html#latestsrc' target='_blank'&gt;here&lt;/a&gt;. &lt;br/&gt;&lt;br/&gt;Happy doxygening. :-)&lt;br/&gt;&lt;br/&gt;--Brahmana.&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-6193872581929022621?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/6193872581929022621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/doxygen-yet-another-technical-wonder.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6193872581929022621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6193872581929022621'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/doxygen-yet-another-technical-wonder.html' title='Doxygen - Yet another technical wonder'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-2787692549492940154</id><published>2008-07-15T17:16:00.001+05:30</published><updated>2008-07-15T17:18:16.050+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='JS'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>A web-wizard to create XPCOM components in JS</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;a href='http://ted.mielczarek.org/code/mozilla/jscomponentwiz/'&gt;JavaScript XPCOM Component Wizard&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;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.&lt;br/&gt;Just visit the link at the top and try your hands at it.&lt;br/&gt;&lt;br/&gt;Happy Componenting. ;-)&lt;br/&gt;&lt;br/&gt;--Brahmana.&lt;br/&gt;&lt;blockquote/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-2787692549492940154?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/2787692549492940154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/web-wizard-to-create-xpcom-components.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2787692549492940154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2787692549492940154'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/web-wizard-to-create-xpcom-components.html' title='A web-wizard to create XPCOM components in JS'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-2320310562012085092</id><published>2008-07-08T12:54:00.000+05:30</published><updated>2010-10-15T04:00:13.709+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='entrepreneurship'/><category scheme='http://www.blogger.com/atom/ns#' term='gyaan'/><category scheme='http://www.blogger.com/atom/ns#' term='business'/><title type='text'>A search engine nearing extinction</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;a href='http://www.bloggingstocks.com/2008/07/07/ask-com-turns-over-its-online-mapping-business-to-microsoft/'&gt;Ask.com turns over its online mapping business to Microsoft - BloggingStocks&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;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".&lt;br/&gt;&lt;br/&gt;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".&lt;br/&gt;&lt;br/&gt;-- Brahmana.&lt;br/&gt;&lt;blockquote/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-2320310562012085092?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/2320310562012085092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/search-engine-nearing-extinction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2320310562012085092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2320310562012085092'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/search-engine-nearing-extinction.html' title='A search engine nearing extinction'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-2695381277835253833</id><published>2008-07-04T17:23:00.001+05:30</published><updated>2008-07-04T17:23:42.855+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='laptop'/><category scheme='http://www.blogger.com/atom/ns#' term='bluetooth'/><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Getting bluetooth working on your Thinkpad</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;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.&lt;br/&gt;&lt;br/&gt;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 &lt;a href='http://www-307.ibm.com/pc/support/site.wss/MIGR-62928.html#bluetooth'&gt;this page&lt;/a&gt; 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 -&amp;gt; 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.&lt;br/&gt;&lt;br/&gt;Happy toothing.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-2695381277835253833?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/2695381277835253833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/getting-bluetooth-working-on-your.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2695381277835253833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2695381277835253833'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/getting-bluetooth-working-on-your.html' title='Getting bluetooth working on your Thinkpad'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-7815386058059886207</id><published>2008-07-03T22:34:00.001+05:30</published><updated>2008-07-03T22:42:21.702+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='code performace'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Optimized resource utilization by Firefox</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;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).&lt;br/&gt;&lt;br/&gt;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, &lt;a target='_blank' href='http://www.mozilla.org/quality/networking/docs/netprefs.html'&gt;ways&lt;/a&gt; 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.&lt;br/&gt;&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;And Just as an FYI, here is how you can override cache: &lt;a href='http://developer.mozilla.org/en/docs/XMLHttpRequest#Bypassing_cache' target='_blank'&gt;MDC doc&lt;/a&gt; &lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-7815386058059886207?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/7815386058059886207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/optimized-resource-utilization-by.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/7815386058059886207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/7815386058059886207'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/07/optimized-resource-utilization-by.html' title='Optimized resource utilization by Firefox'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-4014061244852936794</id><published>2008-06-06T18:48:00.005+05:30</published><updated>2008-06-06T20:53:17.554+05:30</updated><title type='text'>Embedding Mozilla -- Post  0 - Prologue</title><content type='html'>I was recently pulled in to help with a project involving mozilla in an application. Though I know a bit of mozilla code-base I was not much aware of the embedding steps. I along with others involved in the project did break our heads heavily on this embedding thing which frustrated me a lot. Hence I decided to read up any damn article on MDC or wikimo related to embedding and learn how to get a browser in a custom app. In such a journey documentation is the most important thing and hence these series of blog posts. I hope these posts will help someone trying to embed mozilla or at the least help me sometime in the future as reference. So here we go.&lt;br /&gt;&lt;br /&gt;First let me start with some links to documents which you better read up before venturing into mozilla world.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. The whole of Mozilla is based on the technology called &lt;span style="font-weight: bold;"&gt;XPCOM&lt;/span&gt; which stands for Cross (&lt;span style="font-weight: bold;"&gt;X&lt;/span&gt;) Platform Common Object Model, which is pretty much similar to Microsoft COM. If you know COM you can draw similarities. You *&lt;span style="font-weight: bold;"&gt;must&lt;/span&gt;* know this. If not then these are the places to go:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;http://www.mozilla.org/projects/xpcom/  -- This is a page of links. The more you read, the better. (Obviously).&lt;/li&gt;&lt;li&gt;http://www.mozilla.org/catalog/architecture/xpcom/ -- This has lesser links and makes more sense to read first. Some essentials are presented here. The IBM Developer works articles are good and are almost like hands on manual.&lt;/li&gt;&lt;li&gt;http://www.mozilla.org/projects/xpcom/book/cxc/ -- This is linked from the above pages, but I am putting it here as it is quite important to read this one. The PDF can be handy.&lt;/li&gt;&lt;/ul&gt;Now you know what XPCOM is and how you should handle it. In the course  you will also have come across certain mozilla tools. For instance the &lt;span style="font-weight: bold;"&gt;"mxr"&lt;/span&gt; - Mozilla Cross Reference (derived from Linix Cross Reference lxr). The whole of the mozilla code base is available on the web and you can search through it, make specific search like search for identifiers, macros, files or even free text. There are several such things and you will get to know them as you get on with the mozilla community. Be sure to visit irc.mozilla.org -&gt; and the channels are #embedding #xulrunner and #developers. (For information on IRC look &lt;a href="http://techbrahmana.blogspot.com/2007/05/using-irc-one-place-for-answers-to-all.html"&gt;here&lt;/a&gt;, For a index of XPCOM/Mozilla terms look &lt;a href="http://brahmana.wikispaces.com/XPCOM_Introduction"&gt;here&lt;/a&gt;.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-4014061244852936794?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/4014061244852936794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/06/embedding-mozilla-post-0-prologue.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4014061244852936794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4014061244852936794'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/06/embedding-mozilla-post-0-prologue.html' title='Embedding Mozilla -- Post  0 - Prologue'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-2563362718722407787</id><published>2008-05-20T16:31:00.001+05:30</published><updated>2008-07-07T10:52:59.846+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Firefox extensions can behave like stand alone applications.</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;div style=''&gt;        &lt;br/&gt;&lt;a href='http://xulsolutions.blogspot.com/2006/07/creating-uninstall-script-for.html'&gt;XUL Solutions: Creating an uninstall script for an extension&lt;/a&gt;&lt;br/&gt;&lt;a target='_blank' href='http://xulsolutions.blogspot.com/2006/07/creating-post-install-script-for.html'&gt;XUL Solutions: Creating a post-install script for an extension&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;This is one interesting thing that I found today. One of the most common things done when an application is installed is to verify that the installation has been proper and things are where they are. Also the very basic requirement for any "clean" application is to leave no traces of its presence when it is uninstalled. This is easily possible in case of stand alone applications which are either straight forward executables or else have standard installers and uninstallers. They can set registry values, hook up with Program files (or package managers in Linux) and finally do the cleaning when time comes. But things are not as simple with Firefox extensions, because the platform, i.e Firefox, is not as extensive as a full fledged operating system. So I was always under the impression that these extensions are installed and run in the controlled environment constantly monitored by FF. But as it appears, I was wrong. Firefox indeed provides install and uninstall events which you can hook on to and do the necessary cleaning up.&lt;br/&gt;&lt;br/&gt;The technical details are in that blog posts. Read it up and have some clean extensions. :-)&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;Brahmana.&lt;br/&gt;&lt;blockquote/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-2563362718722407787?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/2563362718722407787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/05/firefox-extensions-can-behave-like.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2563362718722407787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2563362718722407787'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/05/firefox-extensions-can-behave-like.html' title='Firefox extensions can behave like stand alone applications.'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-5273551733736835843</id><published>2008-05-01T21:04:00.000+05:30</published><updated>2010-10-15T04:00:13.765+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech-also'/><category scheme='http://www.blogger.com/atom/ns#' term='memories'/><title type='text'>Learning from others project --- One big opportunity at VTU</title><content type='html'>VTU students are very aware of the way final year projects are done. I having completed my bachelors, am fully aware of the practices for the 8th sem project. But it appears that the same thing happens with our post-graduate students also. And this realization was made possible by none other than loafer Sethji . It was his brother's (elder of course) M.Tech final sem project. Sethji arranged (bought, actually) for a network based project.  The project was about "&lt;span style="font-weight: bold;"&gt;Frame Relay Networks&lt;/span&gt;". The people who sold the project are not some scientists. So there document also had a lot of similarity with Wikipedia (no wonder). The code wasn't really that complex as it was Java (managed programming). Its not these technicals because of which I am writing here. Its the learning that the project gave me in course of me trying to stuff the concepts through the heads of setu, so he could eventually pass on the knowledge to his brother.&lt;br /&gt;&lt;br /&gt;Not that Setu is a bad or slow learner, but the process took more time than I initially expected. Initial explanations by him made me think that things are pretty simple. Some of my initial assumptions about a few things being hard-coded did turn out to be true.  But I never understood why anything like this was required. After some 3 hours of   googling, reading and other eye/brain straining exercises I finally got some things stuffed into my head first, which were subsequently passed on to setu. As of now I assume that he has got hold of the concept, but I am not entirely sure what he will explain to his brother as he already seems to be pissed off with working on his brother's project (which is totally fair considering that fact that he himself worked for 3 days on his own final sem project).&lt;br /&gt;&lt;br /&gt;Whatever the story or the background or the future might be, I must be thankful to Setu's brother for having made Setu get a project without which probably I would never have know what a "&lt;span style="font-weight: bold;"&gt;Frame Relay&lt;/span&gt;" is. Now about the technicals of the concept/project I have &lt;a href="http://techbrahmana.blogspot.com/2008/05/frame-relay-old-but-interesting-cost.html"&gt;another post on another blog&lt;/a&gt; with a set of links to articles/documents from where I read about it and a bit of my own documentation for the laymen (aka me).&lt;br /&gt;&lt;br /&gt;Now whats interesting about such practices is the opportunity that it provides for opportunists. In this case I happen to learn about this technology when I was no where near it from any angle. There will be many such opportunities, its just a matter of cashing them. This dialog from a Hindi movie makes perfect sense here: "Har minute ek bakra paida hota, aur two usko halaal kane ke liye" which essentially means for every dumb guy out there there will two others ready to exploit.&lt;br /&gt;&lt;br /&gt;If there are guys waiting for someone to help them, there will be someone ready to make him a cash cow. So quickly decide what you want to be.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-5273551733736835843?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/5273551733736835843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/05/learning-from-others-project-one-big.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5273551733736835843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5273551733736835843'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/05/learning-from-others-project-one-big.html' title='Learning from others project --- One big opportunity at VTU'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-3122372557807803162</id><published>2008-05-01T21:00:00.002+05:30</published><updated>2008-05-01T21:33:09.061+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='Networks'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Frame Relay  --- An old but interesting cost-cutting network innovation</title><content type='html'>[Yet to write this up]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-3122372557807803162?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/3122372557807803162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/05/frame-relay-old-but-interesting-cost.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/3122372557807803162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/3122372557807803162'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/05/frame-relay-old-but-interesting-cost.html' title='Frame Relay  --- An old but interesting cost-cutting network innovation'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-2740503071964723877</id><published>2008-04-30T13:08:00.002+05:30</published><updated>2008-04-30T13:48:57.349+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Web protocol handler in FF3</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;This is one awesome thing to happen. Haven't you crunched your face in disappointment and frustration whenever you clicked a "&lt;b&gt;mailto&lt;/b&gt;" link on a webpage and unnecessarily have your desktop mail application (mostly unused and not configured one) popping up, hogging quite a bit of resources? The worst case scenario would be, the above described things happening even when you are logged into one of your web based mail services and thats where you wanted to send an email from.&lt;br /&gt;&lt;br /&gt;Now all that go away. You Gmail might just give you a new mail compose page when you click on a mailto link. And this is not just for the "&lt;b&gt;mailto&lt;/b&gt;" link. There can be web based protocol handlers to any sort of protocol. So all in all FF3 will rock like anything along with making web applications rock harder. So folks be ready to dance for the beat, for the beat will be pretty high paced. :-)&lt;br /&gt;&lt;br /&gt;More details here: &lt;a href="http://starkravingfinkle.org/blog/2008/04/firefox-3-web-protocol-handlers/#comment-6093"&gt;mfinkle's blog.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-2740503071964723877?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/2740503071964723877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/04/web-protocol-handler-in-ff3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2740503071964723877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/2740503071964723877'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/04/web-protocol-handler-in-ff3.html' title='Web protocol handler in FF3'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-78540566421877740</id><published>2008-04-24T13:49:00.000+05:30</published><updated>2008-04-30T13:51:25.009+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='DLL'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>JS-CTYPES Status</title><content type='html'>&lt;a href="http://starkravingfinkle.org/blog/2008/04/js-ctypes-status/"&gt;Mark Finkles Weblog » JS-CTYPES Status&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This was what mfinkle recently talked about js-ctypes. As he said because of the hectic FF3 schedule the devs at mozilla were pretty busy and hence nothing could be done. I being a lazy bot, also did not do anything. In the blog post above, Mark talks about the struct support (which I told that I would be doing). Now I exhibited my initial enthusiasm by writing up a doc, which was not really useful (its &lt;a href="http://brahmana.wikispaces.com/JS-Ctypes+Struct+Support+Proposal"&gt;here&lt;/a&gt;&lt;a href="http://brahmana.wikispaces.com/JS-Ctypes+Struct+Support+Proposal"&gt; &lt;/a&gt;). After that nothing much happened except for a small bug fix.&lt;br /&gt;&lt;br /&gt;Now that mfinkle has rekindled the interest I will also try and contribute. The struct support is still pending and I will start getting XPCOM code exchanging struct information with libffi. After that we can look at the other interface of JS exchanging structs with XPCOM to finally complete the loop. In the mean time I am also looking at embedding mozilla. Will put up a post about that very soon.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Again, Get ready to use deadly binaries in your JS code. JS-ctypes is soon going to be here.. ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-78540566421877740?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/78540566421877740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/04/js-ctypes-status.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/78540566421877740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/78540566421877740'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/04/js-ctypes-status.html' title='JS-CTYPES Status'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-5151808872477733309</id><published>2008-04-09T19:30:00.002+05:30</published><updated>2008-04-09T19:31:31.995+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>#pragma comment(lib, "libfilename")  -- A cool way to indicate dependency.</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;.NET programmers are well aware of the References section of a .NET project using which we specify the dependencies. Things are pretty straight forward in the managed world and with an IDE like Visual Studio it can't be easier. You are using a type from a particular assembly, then just add that assembly to the references of the project. The rest is taken care of by the IDE and framework. When we move to the native/unmanaged world, we get slightly more powers with of course increased responsibility.&lt;br /&gt;&lt;br /&gt;Any external symbol that we are using must be approved by two tools/stages: The compiler and the linker. The compiler can be tackled by having the appropriate header file (.h file) which just has the declaration and no definition/implementation. Using this is simple. #include the header file in whichever source file you are using the symbol. But just make sure that the compiler knows where to find that header file, that is maintain an includes directory and tell the compiler about that directory.&lt;br /&gt;&lt;br /&gt;The linker is a less tamed beast or rather a more difficult a beast to tame. One simple reason being that since it handles the object code, its error messages cannot be traced back to a line in the source code. Another reason being that we have two versions of library: Static and Dynamic.&lt;br /&gt;&lt;br /&gt;Now to use this we will have to provide each of these libs, containing the symbols that we use, as input to the linker. On the VS IDE, we have to list all the required libs in the project settings and also specify the the library containing the libs. I say this is not as simple as the references thing .NET because, to change anything you will have to visit the Project Settings page. And if you are developing without an IDE, your compiler invocation command line will be really really long. (though you can shorten it with some gmake variables and system variables). But apart from these geeky build methods there is yet another simple way to tell the linker which all .lib files it has to look into for symbols when linking the current code and thats where this #pragma directive comes into picture.&lt;br /&gt;&lt;br /&gt;#pragma comment(lib, "requiredLibrary.lib")  --- This line of code will make the linker look for the library file &lt;b&gt;requiredLibrary.lib&lt;/b&gt;. Isn't that cool? Don't you get a feeling that you, kind of, tamed the linker using your C/C++ code?&lt;br /&gt;&lt;br /&gt;All you need to do is to put this line of code in one of your code files and the compiler will know what to do. When this code is encountered, the compiler adds a "search directive" to the object file (.obj file) that it generates. When the linker reads that search record it will know what lib file it has to look for to find any external symbol that is present in the current object file that it is linking.&lt;br /&gt;&lt;br /&gt;So, suppose you are providing a library and you want to enforce this above method on anyone who consumes your lib, you can provide a header file that they must include to use your symbols. And in that header file you can specify this above pre-processor directive. This way all your anyone who is using your lib will implicitly tell the linker which lib file to look for.&lt;br /&gt;&lt;br /&gt;This #pragma comment on a broader sense is used to inject extra information to the object code generated by the compiler. This information can be used by the linker. Here is the msdn article on what all this #pragma comment can do: &lt;a href="http://msdn2.microsoft.com/en-us/library/7f0aews7%28VS.80%29.aspx"&gt;This page.&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-5151808872477733309?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/5151808872477733309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/04/pragma-commentlib-cool-way-to-indicate.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5151808872477733309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5151808872477733309'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/04/pragma-commentlib-cool-way-to-indicate.html' title='#pragma comment(lib, &amp;quot;libfilename&amp;quot;)  -- A cool way to indicate dependency.'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-573358218428159053</id><published>2008-04-03T19:22:00.000+05:30</published><updated>2010-10-15T04:00:13.780+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='country'/><category scheme='http://www.blogger.com/atom/ns#' term='duty'/><category scheme='http://www.blogger.com/atom/ns#' term='humanity'/><category scheme='http://www.blogger.com/atom/ns#' term='government'/><title type='text'>Sensible policeman  --- An excellent showcase of presence of mind</title><content type='html'>India ranks pretty good in corruption ratings, and I am sure which "good" I am talking about. Things can get really over-whelming sometimes in some places of the country. And one of the departments thats deeply into competition is probably the one that should protect the people -- "The Police Department". Or at the least that is what the public (including me) thinks so, and we might as well be partially wrong. But whatever it may be one thing is sure that Bangalore Traffic police is really doing a good job. Now do not blame them for the bad traffic and long jams. Thats the work of the infrastructure people, which the police are not. Police manage the traffic in the currently available infrastructure.&lt;br /&gt;&lt;br /&gt;Now what makes me write this specific blog is a set of two incidents that I recently came across and here they are:&lt;br /&gt;&lt;br /&gt;We have a very small but extremely busy junction in Malleshwaram near Nataraja theatre. We pass through this junction almost everyday. Very recently when I was travelling with my one of my colleagues a little late in the night, we got stuck at that junction. The reason was that there was no policeman manning this junction and hence everyone was trying to find a way for himself wthout considering anyone around them, except for the ones who might hit them. The result, an obvious chaos with all vehicles being stand still because of a dead-lock. Afer waiting for a few minutes my colleague said, in a totally frustrated way, "Couldn't that police be here at this time??! If he was here we could be in our homes by this time. Damn it!!". So it was clear that the presence of a policeman would have brought in a lot of discipline.All of us might blame them, curse them or say anything, but its ultimately true that 80 - 90% of discipline on the roads is because of policemen.&lt;br /&gt;&lt;br /&gt;Now the second incident:&lt;br /&gt;&lt;br /&gt;Again, another day on my way back home from office, I was on a bike with my colleauge, waiting at the signal in front of Chinnaswamy Stadium. We were in the right half on the road and there were two lanes of traffic to our left. The traffic was all piled up and I suddenly saw the policeman, who was manning the signal, let go the two lanes of traffic to our left.I was like: "What the hell is this man doing??!!!". It was only a few seconds I realized the motive, when I heard the Ambulence siren. The ambulance was stuck in the traffic and was in the lane to our left. So the policeman moved the traffic to make way for the ambulance. And of course after the ambulance passed the signal, those two lanes were again stopped. See, policemen do a lot of good and necessary jobs.&lt;br /&gt;&lt;br /&gt;So all tax payers, don't think that ALL the tax paid is going waste. In fact a large amount is being used very well. More about our government and the reality about the government workers in another post very soon.&lt;br /&gt;&lt;br /&gt;Till then, just respect the traffic police, you can respect the others later after my further posts. :-)&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Brahmana&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-573358218428159053?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/573358218428159053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/04/sensible-policeman-excellent-showcase.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/573358218428159053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/573358218428159053'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/04/sensible-policeman-excellent-showcase.html' title='Sensible policeman  --- An excellent showcase of presence of mind'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-1475498864497634462</id><published>2008-04-01T16:40:00.002+05:30</published><updated>2008-04-07T14:39:05.382+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>.NET metadata available in 2 ways - Reflection and TypeDescriptor</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Ever since I was introduced to Java during my internship at IBM, I have been fascinated about the concept of Reflection. The only way something like that was possible in C/C++ was to put a function in a DLL and use GetProcAddress(), which we all know can get real dirty. But with Reflection things are real smooth and way more powerful. Without that you think the IDEs would have been this awesome?&lt;br /&gt;&lt;br /&gt;Anyways this fascination continued at my first work place, National Instruments, where I started working with .NET. But it was not until today that I was aware of a competitor to this Reflection in .NET. That is the &lt;b&gt;TypeDescriptor&lt;/b&gt;. Things can just keep getting more and more awesome with these managed frameworks. First they came up with Reflection, which just exposed any type from any assembly. This probably made the Type designer think that their types were lying around bare in front of their users. They saw the types struggling to cover themselves, hiding and crying. The scene was like the regime of an evil master/demon. But God protects the weak and the prayers of the Type and Type designers were answered. The framework developers finally decided to shield these poor and shy Types from their consumers and that is when they came up with this "&lt;b&gt;TypeDescriptor&lt;/b&gt;" funda.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;With this TypeDescriptor leading the troops from the front, Type and Type designers could combat the evil. If Reflection was like the nuclear energy in the hands of the evil, TypeDescriptor was like the lead container used to put the nuclear radiations under control. I mean, with TypeDescriptor we can decide what the type will look like to other people when looked through the TypeDescriptor. So if we have to protect our types we have to con the users into looking through this Descriptor and not the old weapon.&lt;br /&gt;&lt;br /&gt;If TypeDescriptor is under use with a type, it expects that particular type to throw open some methods which the TypeDescriptor can use to give some information about the type. Later on this information is passed on to our users. And the obvious way of providing this methods is through interface and an example is ICustomTypeDescriptor. And if I remember correctly, just like assigning a TypeConverter to a type we can probably assign a TypeDescriptor also which takes care of presenting the type to the outside world.&lt;br /&gt;&lt;br /&gt;But you know what, if your type does not have a custom type descriptor, or has a very lazy one - meaning one that just forwards the calls to the default one, then the shield no longer works. Because if the TypeDescriptor does see any openings to get information about the type, it goes for the inevitable --- &lt;b&gt;Reflection&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;So go protect your types, and don't forget the conning part.&lt;br /&gt;&lt;br /&gt;In another post I will be more technical and less a story teller and write about the implementation of this TypeDescriptor.&lt;br /&gt;&lt;br /&gt;--- Hari Om.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-1475498864497634462?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/1475498864497634462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/04/net-metadata-available-in-2-ways.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1475498864497634462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1475498864497634462'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/04/net-metadata-available-in-2-ways.html' title='.NET metadata available in 2 ways - Reflection and TypeDescriptor'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-8549948168054005782</id><published>2008-03-14T15:51:00.002+05:30</published><updated>2008-04-07T14:40:11.447+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='IRC'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>Styling Chatzilla userlist and XUL Trees</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;In my previous post I mentioned how I was fiddling with Chatzilla "css" files to get a custom style so that and failed utterly with the userlist. And it was later I found this website: &lt;a href="http://weblog.juima.org/showpost.asp?postid=3379"&gt;How to style your Chatzilla userlist to fit with a dark motif. - Just Imagine... a weblog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This webpage (yet another blog post) tells how the userlist can be customized. Since the userlist is a "XUL Tree" styling it is a little complicated. In XUL trees are something like dynamically populated UI components. So you do not actually know what a treecell will contain when being displayed. So we use css with a few predefined pseudo classes and a couple of properties to decide what style has to be applied for anything contained in a treecell or for that matter the whole tree itself that is present as the userlist.&lt;br /&gt;&lt;br /&gt;This styling thing is really cool and fun. Just try it out.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-8549948168054005782?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/8549948168054005782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/03/styling-chatzilla-userlist-and-xul.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8549948168054005782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8549948168054005782'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/03/styling-chatzilla-userlist-and-xul.html' title='Styling Chatzilla userlist and XUL Trees'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-8556998548374851406</id><published>2008-03-13T15:21:00.002+05:30</published><updated>2008-04-07T14:40:36.253+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Faces of mozillians in Chatzilla</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Today I discovered this cool page on the chatzilla website that provides motifs (themes) for Chatzilla which will show faces of the mozillians. Check out this page: &lt;a href="http://chatzilla.hacksrus.com/faces.pl"&gt;moznet faces&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Though not all of them are listed, there are quite a lot that I know. This is a really awesome idea. And the best part was the way these motifs can be applied. I just had to drag and drop the link to the css files in the Chatzilla message window and that motif is just picked up. This amazed me more than anything.&lt;br /&gt;&lt;br /&gt;I trying to use these motifs I also ended up reading how I can style my chatzilla with some custom (read weird) colors and images by simply writing some css rules. It in fact is just overriding any of the already defined css style class definitions. So its really simple. I will write about that separately. But you know what this whole styling this is real fun and a must try for anyone related to web and irc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Technorati Tags: &lt;a class="performancingtags" href="http://technorati.com/tag/mozilla%20css%20tech" rel="tag"&gt;mozilla css tech&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-8556998548374851406?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/8556998548374851406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/03/faces-of-mozillians-in-chatzilla.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8556998548374851406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/8556998548374851406'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/03/faces-of-mozillians-in-chatzilla.html' title='Faces of mozillians in Chatzilla'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-5571856820639419138</id><published>2008-03-04T11:22:00.002+05:30</published><updated>2008-03-04T13:15:04.832+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='VB'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Special chars and Escape sequences in .NET strings</title><content type='html'>Having come from C/C++ programming, and that too mainly console programming, escape sequences were very dear to me as they were my sole friends when it came to formatting the output. Now at work I work with C# .NET and things are not the same. I wrote a XSLT processor, as part of my job, and I wanted to log every successful XSL trasnformation. Well the file I/O was a lot easier with .NET types, but introducing an newline at the end of every log entry was a big pain. As I used to do earlier I simple put a "\n" at the end of the log message. This resulted in a empty square box being placed there instead of a newline. This was totally wierd and I started to wonder whether I have been writing Japanese???!!!&lt;br /&gt;&lt;br /&gt;Then a little bit googling told me that .NET has encapsulated these special chars and newlines in a type called "Environment". This makes sense. Newline can be differnet in different environment. And with this encapsulation we get the correct newline for any environment.&lt;br /&gt;&lt;br /&gt;So in C# if you want to add a newline to your string use the "Environment.Newline" object. VB .NET developers are, as usual, lucky with a easier encapsulation. They have a type called "ControlChars" and this can be used like this: "ControlChars.crlf" which of course is more intutive that something like environment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-5571856820639419138?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/5571856820639419138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/03/special-chars-and-escape-sequences-in.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5571856820639419138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5571856820639419138'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/03/special-chars-and-escape-sequences-in.html' title='Special chars and Escape sequences in .NET strings'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-6818168737119512317</id><published>2008-01-28T01:04:00.000+05:30</published><updated>2010-10-15T04:00:13.799+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gyaan'/><category scheme='http://www.blogger.com/atom/ns#' term='planning'/><category scheme='http://www.blogger.com/atom/ns#' term='Doddappa'/><title type='text'>Face the worst first and get rid of it asap.</title><content type='html'>&lt;p class="MsoNormal"&gt;This is yet another discussion with Doddappa (Uncle). It’s a pretty simple thing yet a lot of us do not seem to remember it and practice it. I do not remember how this one came up, but its here. This is one of his philosophies which have been appreciated by others. The idea is about prioritizing the things/to-dos of the day. There will be a lot of days in every person’s life when there will a few “good” to-dos and a probably a couple of “not so good” or “difficult” to-dos also. And these difficult ones will generally be such that we will be hesitating to carry out them. And, as a result we generally keep postponing them as we would be afraid to face them. Also nobody would like to start the day with something bad, because of a strange belief that the rest of the day would also be bad. But what most of us forget is that these unwanted responsibilities keep eating our resources – time, thought and energy, until we get rid of them.&lt;span style=""&gt;  &lt;/span&gt;This directly results in a reduction in our efficiency even when we are doing something that we love the most, because the fear of having to do the unwanted will always be eating us from the inside. We do not get rid of the unwanted even when we know that it is something that we ultimately will have to face. So to avoid all the losses or resources the best thing would be to finish of the most unwanted and most feared task of the day as soon as possible in the early hours of the day. This will ensure us a successful and more productive day ahead of us. So just get rid of the unwanted and feared things first and that will allow us to enjoy the things we actually like to do.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-6818168737119512317?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/6818168737119512317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2008/01/face-worst-first-and-get-rid-of-it-asap.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6818168737119512317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6818168737119512317'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2008/01/face-worst-first-and-get-rid-of-it-asap.html' title='Face the worst first and get rid of it asap.'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-7083878039978369880</id><published>2007-12-30T12:40:00.000+05:30</published><updated>2010-10-15T04:00:13.819+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='memories'/><category scheme='http://www.blogger.com/atom/ns#' term='hostel'/><title type='text'>Nostalgia and the movie next day</title><content type='html'>&lt;p class="MsoNormal"&gt;Date: 29&lt;sup&gt;th&lt;/sup&gt; December 2007&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Since few days, because of some unknown reason, I constantly wished to be back in my 3&lt;sup&gt;rd&lt;/sup&gt; year of engineering with all my friends at hostel, specifically the L4x series of rooms along with the 3 CSI seniors. That was probably the best part of my engineering life. The amount of learning and amount of fun was highest during this time. I guess, if given again, I would enjoy that part of my life at any moment and any number of times. Now as part of the co-incidence series of posts, this one will also present another instance of co-incidence.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Yesterday when I was going to office, I saw a boy with a bag running to catch a bus. He reminded me of Harish Bhai and an incident when me and him had raced casually after lunch. I once again wished to be in one of those CSI meetings under the chairmanship of the Harish Bhai. After this when I reach office and logon to Gmail, I see Harish Bhai online after so many days and I talked to him for a few minutes.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Today being weekend I got up late, only to find two Kannada movie CDs on the table in front of my bed. My Doddamma (Aunt) got it from a neighbor here. As I was absolutely jobless (in one sense) I decided to watch one of the movies as it was a long time since I watched any of the new-age Kannada movies. Of the two I picked up one and seeing that Sudeep (A well known Kannada actor with a commanding voice) is the protagonist I started watching it. The movie was really good and I enjoyed it like anything. Now the co-incidence part is that the movie was about the protagonist recollecting the past – his school days, college days and initial days of his work, at a time when he was deciding on the list of people whom he wanted to invite for his wedding. He wanted to see all these three spheres of his life together once again for one last time. Every scene was beautifully portrayed (of course except for the songs) and each instance in those scenes reminded me of some instance that had happened in my life. I too have three sets of friends, in fact four including the colleagues at office. I could correlate several parts of my life with quite a few scenes of the movie. The only outstanding difference was that the protagonist has “FOUR” girls in his life where as there are typically none in mine. But nevertheless I have much bigger group of friends and above all a lot of them are still in contact with me and we talk frequently enough.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;I suggest any person who has lived a hostel life to watch this movie. By the way, the movie is “My Autograph”. A really good movie (would have been much better without songs). I wish science was advanced enough for me to afford a minimal time machine, without any accessories, at least.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-7083878039978369880?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/7083878039978369880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/12/nostalgia-and-movie-next-day.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/7083878039978369880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/7083878039978369880'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/12/nostalgia-and-movie-next-day.html' title='Nostalgia and the movie next day'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-7368530319411241304</id><published>2007-12-16T03:51:00.000+05:30</published><updated>2010-10-15T04:00:13.834+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='gyaan'/><category scheme='http://www.blogger.com/atom/ns#' term='tech-also'/><category scheme='http://www.blogger.com/atom/ns#' term='career'/><title type='text'>Need of Exposure To Open Source Community</title><content type='html'>&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: arial;"&gt;&lt;span style=";font-size:100%;" &gt;Ever since I have been associated with Mozilla community I have been interacting with a lot of people involved in the development of the Mozilla products, mainly Firefox web browser. I have learnt so many things from the community and have interacted with several extremely modest people who despite being extremely knowledgable and busy too, often helped me with my stupid questions. And in several occasions I see people younger than me who are so bright and have contributed much more than what I have done. All these situations just keep reminding me that no matter how much of Computer Science I know, how much of coding and design I have done there is still so much to learn and there are a lot of people who are simply better than me. The second part especially motivates me and always keeps ringing in my head in case I start thinking big of myself. Not that I am boasting about myself, but it’s true that I was a pretty good programmer back in the college. I was one guy who did a few things others did not do or others did not consider doing, though there were several who were way ahead of me in knowledge and intelligence and had much more capacity than me. Basically I am trying to say that I was somewhat good amongst the guys in the college. And this had given me a feeling of satisfaction (to some extent) that I have indeed learnt something and achieved something. I knew that a lot of real good punters lurked around in the open source community through my frequent visits to IRC. That to some extent kept me glued to earth and prevented me from being complacent. But I always carried around a thought that I am some good.&lt;/span&gt;&lt;/p&gt;          &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: arial;"&gt;&lt;span style=";font-size:100%;" &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;That was clearly a crappy thought. And it became more and more clear when I was formally involved with an open source community and interacted with the folks there more and more. I, like any beginner in the community (Mozilla community), had several things to learn during the initial stages and always had a lot of questions. Probably in my case it was a little more than any other beginner. Luckily I had several people in the community helping me out and always ready to answer my questions. Whenever I came across a new nickname in any channel I am observing I would just try and find out more about the person. That way I got to know about different people pretty well. I came across people who have been there right from the time Mozilla originated or even before when it was still NetScape. But none of them carried any air of pride and were very modest all the time. The credentials of the person answering my question used to be so high that I often feared asking anything thinking that I would just get some scolding for putting in a silly question. But such a thing never happened. Be it a regular developer or QA guy, employed or a volunteer, young or old, they all helped me. It’s not just the modesty, but their technical knowledge also is worth speaking. They were so precise, they considered situations that never occurred to me, they thought of performance, usability and several such things simultaneously and every word of theirs carried weight, every bit of it was informative. Sometimes things went way above my head and I had to ask them to explain the same things again and again and in simpler words. They did that almost every time. If I was not ready to understand what they were talking about someone would point me to a nice document which would clearly explain me the basics, after reading which I could understand the discussion easily.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: arial;"&gt;&lt;span style=";font-size:100%;" &gt;&lt;br /&gt;All these things always told me one thing: World is really big and it has some really big people, so be modest and be ever receptive. This means that there are a lot of heights yet to be scaled by anyone and hence one should never stop learning because there is always something new to learn. It is in this &lt;b&gt;OPEN SOURCE COMMUNITY &lt;/b&gt;that I realized what computer science and programming is. It is because of the &lt;b&gt;PEOPLE IN THIS COMMUNITY &lt;/b&gt;I realized that there is so much to learn. If not for this community I would probably have been a complacent guy who would have shut his doors for new knowledge and considered himself a "GOOD PROGRAMMER". Thank you &lt;b&gt;OSS&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: arial;"&gt;&lt;span style=";font-size:100%;" &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;That is why I would say that exposure to the open source community and affiliation with one of those is mandatory for any computer science student who aims at being a successful and worthy programmer. It is here people will get a look of the ocean named programming and the several software applications that are churned out continuously. I hope this becomes the order of the day very soon and every computer science student will learn programming real world applications right when he/she is in college. This would also lead several success stories coming from our Indian academic institutions and we will be leaders, intellectually, once again.&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: arial;"&gt;&lt;span style=";font-size:100%;" &gt;Jai Shree Yalaguresh Prasanna.&lt;br /&gt;Hari Om.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-7368530319411241304?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/7368530319411241304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/12/need-of-exposure-to-open-source.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/7368530319411241304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/7368530319411241304'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/12/need-of-exposure-to-open-source.html' title='Need of Exposure To Open Source Community'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-6459806376331138522</id><published>2007-12-13T15:20:00.000+05:30</published><updated>2007-12-13T15:39:04.360+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>References issue with __fastcall calling conventions</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;I talked about calling conventions in an &lt;a href="http://techbrahmana.blogspot.com/2007/12/calling-conventions.html"&gt;earlier post&lt;/a&gt;. There I mentioned that if the function is qualified with the &lt;span style="font-weight: bold;"&gt;__fastcall &lt;/span&gt;calling convention the system will try to push the parameters to the registers instead of the stack and there by tries to increase the speed of the function call. But this would just be an attempt. We are not assured that our parameters will always go to the registers. This is because of the availability of the registers.&lt;br /&gt;&lt;br /&gt;Apart from this there is another issue associated with __fastcall. Since the parameters are put in the registers, those variables will not have any address location. So if we try to fetch/use the address of the parameters the system will be in a fix as it will not have any address to return. In such a case the params in the registers are copied to some temporary memory location and the address of that location is returned. This temporary location can be anything. It can be the regular stack itself.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-6459806376331138522?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://techbrahmana.blogspot.com/2007/12/calling-conventions.html' title='References issue with __fastcall calling conventions'/><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/6459806376331138522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/12/references-issue-with-fastcall-calling.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6459806376331138522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6459806376331138522'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/12/references-issue-with-fastcall-calling.html' title='References issue with __fastcall calling conventions'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-5719429301671439847</id><published>2007-12-13T14:37:00.000+05:30</published><updated>2007-12-13T15:38:23.043+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Calling Conventions --- __cdecl V/s __stdcall</title><content type='html'>&lt;span style="font-family:arial;font-size:100%;"&gt;In an &lt;a href="http://techbrahmana.blogspot.com/2007/12/calling-conventions.html"&gt;earlier post&lt;/a&gt; I mentioned that the &lt;span style="font-weight: bold;"&gt;__stdcall &lt;/span&gt;calling convention reduces the code size by putting the stack clear statement just before the return statement. If this is better than &lt;span style="font-weight: bold;"&gt;__cdecl &lt;/span&gt;then why do we need this "__cdecl" calling convention at all??&lt;br /&gt;&lt;br /&gt;As we know, in "__cdecl" the caller will clear the stack. This would be the ideal behavior if the callee does not know how much of stack to clear. This is absolutely the situation in case of functions with variable number of arguments. The callee will not known how many arguments it is going to receive when compiling the code and hence will not be able to put a proper stack move statement. On the other hand this info will be available with the calling function and an appropriate stack move statement can be put right after the function call instruction. This is where the &lt;span style="font-weight: bold;"&gt;"__cdecl" &lt;/span&gt;convention comes to rescue.&lt;br /&gt;&lt;br /&gt;Functions with variable arguments will be qualified with "__cdecl" calling convention.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-5719429301671439847?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://techbrahmana.blogspot.com/2007/12/calling-conventions.html' title='Calling Conventions --- __cdecl V/s __stdcall'/><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/5719429301671439847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/12/calling-conventions-cdecl-vs-stdcall.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5719429301671439847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5719429301671439847'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/12/calling-conventions-cdecl-vs-stdcall.html' title='Calling Conventions --- __cdecl V/s __stdcall'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-4914983168171144625</id><published>2007-12-11T16:02:00.002+05:30</published><updated>2008-05-15T12:17:09.170+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='code performace'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Calling Conventions</title><content type='html'>&lt;div style="font-family: arial;" xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;span style="font-size:100%;"&gt;This is the outcome of today's presentation by Anand - our tech lead.&lt;br /&gt;There are four calling conventions, and the Microsoft terminologies for them are:&lt;br /&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;__stdcall&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;__cdecl&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;__thiscall&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;__fastcall&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:100%;"&gt;As its known, the calling conventions will tell who, amongst the caller and callee, will clear the parameters from the top of the stack when the function call completes.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;__cdecl&lt;/span&gt; is the old 'C' way where the stack is cleared by the &lt;b&gt;calling &lt;/b&gt;function. Clearing the stack is nothing but having a statement to move the stack pointer up by some number (which is generally the number of arguments). So when a call is placed, immediately after instruction to call, there will be an instruction to move the stack pointer. This way we have an extra instruction associated with every function call instruction. This leads to the increased size of the executable, because of one extra instruction for every function &lt;span style="font-weight: bold;"&gt;call.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;__stdcall &lt;/span&gt;is the new way where every function is responsible for clearing the stack allocations made for its parameters. As in, the &lt;span style="font-weight: bold;"&gt;callee &lt;/span&gt;is the one who will rewind the stack and move the stack pointer. In this approach before the return statement of the function a statement to move the stack pointer is introduced. This way the number of instructions will not increase with the number of the function calls.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;__thiscall &lt;/span&gt;is the object-oriented way of calling functions. Here the first parameter passed is always the &lt;span style="font-weight: bold; font-style: italic;"&gt;"this" &lt;/span&gt;pointer. So any instance function member of a class will follow this calling convention. Unlike other parameters, which go to the stack top, the &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;"this" &lt;/span&gt;&lt;/span&gt;parameter which is also passed is stored in &lt;span style="font-weight: bold; font-style: italic;"&gt;"ECX" &lt;/span&gt;register. Now this is how the &lt;span style="font-weight: bold; font-style: italic;"&gt;"this"&lt;/span&gt; pointer is &lt;span style="font-weight: bold;"&gt;implicitly &lt;/span&gt;available to all the instance member functions. No function can be explicitly qualified with this calling convention. Any instance member function will get this implicitly, but it can be over-ridden with any other calling convention.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;__fastcall &lt;/span&gt;is an approach where in the system will try to push the parameters on to &lt;span style="font-weight: bold;"&gt;Registers &lt;/span&gt;instead of the stack just to get a performance boost. But as with the variable qualifier &lt;span style="font-weight: bold;"&gt;"register"&lt;/span&gt; , if the registers are not available then again stack is used for the parameters.&lt;br /&gt;&lt;br /&gt;There are a couple of other posts regarding the specifics of the calling conventions and comparison. If this post made any sense then check out those also.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-4914983168171144625?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/4914983168171144625/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/12/calling-conventions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4914983168171144625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4914983168171144625'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/12/calling-conventions.html' title='Calling Conventions'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-3316047755945798868</id><published>2007-12-10T04:08:00.000+05:30</published><updated>2010-10-15T04:00:13.857+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='memories'/><title type='text'>FOSS.IN/2007 – The most exquisite FOSS event</title><content type='html'>&lt;w:sdt style="font-family: arial;" contentlocked="t" sdtgroup="t" id="89512093"&gt;&lt;span style="font-size: 1pt;"&gt;&lt;w:sdtpr&gt;&lt;/w:sdtPr&gt;&lt;w:sdt xpath="/ns0:BlogPostInfo/ns0:PostTitle" docpart="D66F917EE4554A539B87ACEB31EB6B67" text="t" storeitemid="X_C21353E8-37EB-4352-B9AE-22C754EDAE46" title="Post Title" id="89512082"&gt;&lt;/w:Sdt&gt;&lt;/span&gt;&lt;/w:Sdt&gt;&lt;span style="font-family: arial;"&gt;In an earlier post I mentioned how much Mozillians have influenced me and that will surely give an idea as to how much eager I would be to meet any of those people. Well it finally happened this year during the FOSS.IN/2007 as IISc in Bangalore. I was looking forward for this event even before Mozilla was a part of this. I had missed it in the last couple of years and this year I was very keen on attending it as I was in Bangalore itself and the venue was so close to my residence. I sometimes even thought of bunking office for all the five days and have some real good time with all the open source freaks from different parts of the world. As crazy the idea seems to be I was able to attend the event only for one full day and a part of another. That apart, my interest in the event doubled or increased by several times when I found out that Mozilla was one of the projects for Project Days and few of the folks that I had talked to over IRC were coming down to speak at this event. I was very much excited and followed the event very closely. I completed my online registration the day it was announced, I subscribed to the RSS feed of the FOSS.IN/2007 main page, looked at the schedule when it was posted, read about speakers and what they will be speaking when that was put up. Basically I made sure I did not miss out on any detail. Another thing that caught my attention was the Google summer of code BoF (Birds of Feather) that was proposed and also accepted. This was another chance to meet fellow countrymen involved in the development of FOSS. Altogether this was something really big and was close to one of my all time dream of being amidst full time geeks and computer science pundits.&lt;/span&gt;  &lt;p style="font-family: arial;" class="MsoNormal"&gt;I was getting ready for the event and unfortunately cold and soar throat struck me a couple of days before the event. Nevertheless I asked for a sick leave on the first day of the event and thanks to my manager who granted it immediately. I quickly got ready by noon after some extra resting in the morning and took my uncle’s laptop and moved to IISc to meet the OSS freaks from different parts of the country and the world.&lt;/p&gt;  &lt;p style="font-family: arial;" class="MsoNormal"&gt;As I was late I missed out on talks related to extension development and a couple of other dev stuff in the Mozilla project days schedule. When I went there it was close to lunch time and almost everyone was moving to the dining area. As I was not completely healthy I had restrain myself from enjoying the FOSS delicacies. I just roamed around the event area looking at the various corporate stalls that were put up there. A couple of days before the event I had met a friend’s brother, who was going to launch a product of his company in this event. I went and met him and looked at the various products that were out there for exhibit. This got over pretty quickly and I had to find something for me to spend time.&lt;/p&gt;  &lt;p style="font-family: arial;" class="MsoNormal"&gt;Fortunately the event area was Wi-Fi enabled. I utilized the lunch break to update my Mozilla repository on my uncle’s laptop and also to submit a patch which was waiting in my inbox. The wireless connectivity was really good and the speed was well worth mentioning. By the time my repo was up-to-date the afternoon session had started. Then I moved to Satish Dhawan auditorium where the Mozilla talks were being held and spent the rest of the day with the Mozillians. More about the time spent with Mozilla folks in a later post. But I must really thank Team FOSS.IN which made it possible for me to meet the Mozilla people and have some good time with them.&lt;/p&gt;  &lt;p style="font-family: arial;" class="MsoNormal"&gt;On the whole the FOSS.IN/2007 experience was awesome and memorable. It was very well organized and at the end of the day I saw Atul Chitnis (One of the main men behind the success of the event) hanging around with the volunteers. The sleeveless jackets that the volunteers were given always made me feel that I too should have been a volunteer. ;-) &lt;/p&gt;  &lt;p style="font-family: arial;" class="MsoNormal"&gt;Jai Shree Yalaguresh Prasanna&lt;/p&gt;  &lt;p style="font-family: arial;" class="MsoNormal"&gt;Hari Om.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-3316047755945798868?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/3316047755945798868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/12/fossin2007-most-exquisite-foss-event.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/3316047755945798868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/3316047755945798868'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/12/fossin2007-most-exquisite-foss-event.html' title='FOSS.IN/2007 – The most exquisite FOSS event'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-4768269057278029408</id><published>2007-12-05T16:10:00.000+05:30</published><updated>2010-10-15T04:00:13.888+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='memories'/><title type='text'>My First Hangout with Mozillians</title><content type='html'>&lt;w:sdt style="font-family: arial;" contentlocked="t" sdtgroup="t" id="89512093"&gt;&lt;span style="font-size: 1pt;"&gt;&lt;w:sdt xpath="/ns0:BlogPostInfo/ns0:PostTitle" docpart="6E40967F50B74385A797FA49599C11B5" text="t" storeitemid="X_C21353E8-37EB-4352-B9AE-22C754EDAE46" title="Post Title" id="89512082"&gt;&lt;/w:Sdt&gt;&lt;/span&gt;&lt;/w:Sdt&gt;&lt;span style="font-family: arial;"&gt;As I am involved in the development of the Mozilla Firefox web browser I have always thought of meeting the actual full time Mozilla developers and spending some time with them. As most of them are in US, in a normal scenario this would have happened sometime when I was in US. But luckily for me this happened in India, right here in Bangalore where I stay. It was today, the 4&lt;/span&gt;&lt;sup style="font-family: arial;"&gt;th&lt;/sup&gt; of &lt;span style="font-family: arial;"&gt;December 2007, during the FOSS.IN/2007 event at IISc.&lt;/span&gt;  &lt;p style="font-family: arial;" class="MsoNormal"&gt;On account of being sick during the event I was not able to attend all the talks. I missed out on all the morning talks as it was already lunch time when I went there. So I started with the afternoon session where Axel talked about localization, Chris Hoffman talked about Testing and Krishnakanth talked about accessibility. Though these were not the talks that I was looking forward to listen to, I just spent my time in the auditorium waiting for an opportunity to speak to Myk, who was the only developer guy amongst those who had come. All the talks got over at around 6:00pm and it was announced that interested people can talk to the Mozillians. Though Myk was already caught by a couple of Akamai guys, I went to him and introduced myself with the “Resumable Downloads” tag. Though he did not remember me he remembered the feature and that made it easy for me to talk to him. Moreover I was wearing my GSoC shirt, which luckily my father had got it from home just a day before. That carried some recognition too. &lt;/p&gt;  &lt;p style="font-family: arial;" class="MsoNormal"&gt;Then me, Myk, the Akamai guys and another person interested in XUL and Thunderbird talked at length about various things involved in Mozilla development. The Akamai guys asked me if I am interested in joining them when they realized that I knew Mozilla stuff, after they heard me speaking about debugging release builds of Firefox using remote symbol server. Then we exchanged contact info and they asked me to send them some info on that debugging thing. There were a couple more incidents like this where in I met different people from different companies, small and big, who were doing some work related to Mozilla.&lt;/p&gt;  &lt;p style="font-family: arial;" class="MsoNormal"&gt;Then we carried the banners and posters to the store room and that was when I got introduced to the other 3 Mozillians present there: Mary, Chris and Axel and also to other Indian developers, a couple of NIT-Jaipur students and a RV college lecturer. After we deposited the banners and stuff in the store room, I asked Mary about their plans for the rest of the day and she said, “We are going out for dinner to some place nice and you are coming with us.” I was like “Me???!!!” She said, “Yes you. Lets go, the cars are here.” I was so surprised and did not know what to say. Luckily the RV college lecturer and the NITJ students were also coming and that made things a little more comfortable. I and the lecturer agreed to go on his bike and the rest of them came in cars. We went to an Italian restaurant named “Sunnys”. &lt;/p&gt;  &lt;p style="font-family: arial;" class="MsoNormal"&gt;We spent nearly 3 hours there eating and talking. A few of them had some nice Italian wine and other drinks. I sat next to Myk, with Axel and Mary in front of me. &lt;span style=""&gt; &lt;/span&gt;We again talked about the various things happening at Mozilla. The OS conflicts, views of different people and who is working on what. It was during this discussion that Myk told me about Timeless’ secret project at Nokia, where he was involved in development of a Mozilla based browser for Nokia N810 tablet. I also got to know about several other such things. Mary told us about her driver running over a dog and several other things that they find so very surprising about India. For instance, traffic was one of them. They even took pictures and video recordings of the traffic to show it to people back in US. &lt;/p&gt;  &lt;p style="font-family: arial;" class="MsoNormal"&gt;Overall it was a nice time and I learnt that the employed folks are also as fun loving and easy going as us. I got to know a lot about the internals of the Mozilla and some of the current affairs. It was basically a start for me to get more known in the community so that people would identify me with my contributions when I talk in IRC. I guess this motto was achieved to some extent. At least of the 4 I am sure Myk remembers me. After that me and the NITJ students went home and it was the end of a memorable day. Hope I get more of such days.&lt;/p&gt;  &lt;p style="font-family: arial;" class="MsoNormal"&gt;Jai Shree Yalaguresh Prasanna&lt;/p&gt;  &lt;p style="font-family: arial;" class="MsoNormal"&gt;Hari Om.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-4768269057278029408?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/4768269057278029408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/12/my-first-hangout-with-mozillians.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4768269057278029408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4768269057278029408'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/12/my-first-hangout-with-mozillians.html' title='My First Hangout with Mozillians'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-23666021333001794</id><published>2007-11-29T17:16:00.001+05:30</published><updated>2007-11-29T21:48:18.190+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Intellisense in VS2005 stops working</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Its a very well known issue with VS2005. Intellisense is not all intelligent, though it is programmed to be like that. It is indeed helpful and helps us avoid a lot of dog work and remember the big long names and types and parameters a function takes and all that regular crap. But the bad thing is that, the intellisense works fine for the first few days until we get addicted to it and one fine day when you are close to your deadline it suddenly stops working crippling you like anything and your work almost comes to a halt. &lt;br/&gt;&lt;br/&gt;Thank god for editors like Vim and build systems which use "Make" and other command line tools. These keep our mind fit enough to do some exercise in case of emergency. Nevertheless we still want that intellisense thing to work, because we have this "IDE" here and it must be better than any editor. So here is how you get it working again:&lt;br/&gt;&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Close the solution.&lt;/li&gt;&lt;li&gt;Go to the directory of the solution and delete the &lt;b&gt;.ncb &lt;/b&gt;file. &lt;br/&gt;&lt;/li&gt;&lt;li&gt;Re-open the solution and build it once. The .ncb file must be regenerated now. This must wake up intellisense again  and get it working.&lt;/li&gt;&lt;li&gt;If not then delete the obj directory of the project also and then build it again.&lt;/li&gt;&lt;/ul&gt;If none of these work then there is some serious problem that you should not try solving and stop reading this blog and read something useful.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-23666021333001794?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/23666021333001794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/11/intellisense-in-vs2005-thinks-its.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/23666021333001794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/23666021333001794'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/11/intellisense-in-vs2005-thinks-its.html' title='Intellisense in VS2005 stops working'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-4275132943475084850</id><published>2007-11-25T10:28:00.000+05:30</published><updated>2007-11-29T17:16:39.272+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='DLL'/><title type='text'>VS2005 has a feature (supposedly) called "Copy Local"</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;VS2005 and  .NET users are pretty familiar with the way the IDE makes the job so easy and keeps us away from all the build related things like references, linking and all that stuff. But in many cases this might actually be far from desired behavior. One such that recently took away some of my time was the "Copy Local" attribute on the references. This is a boolean property on the references added to a project. If this is set to true, then when the project is built the assemblies added as references as copied to the 'bin" folder of that project. Depending on the build, its either the "Debug" or the "Release" folder. With this, in future whenever the project is built, the DLLs in the bin directory are used, unless you change your references. This will cause a problem when one of the referred assembly is updated and you expect the new behavior, but get the old one instead.&lt;br/&gt;&lt;br/&gt;Example, You would have added an assembly,  E:\assemblies\MyAssembly.dll as a reference. Now when you want to update the assembly you typically replace the old MyAssembly.dll with the new DLL in the above mentioned location. And then you expect your project to reflect the new assembly, but it does not do that because "Copy Local" being true would have lead to the old DLL being copied to the bin folder of the project and though you updated the DLL in its original location, the reference was pointing to the DLL copied to the bin directory.&lt;br/&gt;&lt;br/&gt;So watch out for this &lt;b&gt;Feature. &lt;/b&gt;From what I know, this feature can be serialized in the assembly itself. Though this might be a good feature for applications which will use the same DLLs for a long time, this is clearly a bad choice for people who are writing small test applications to test their DLLs. Because with every new build the DLL version changes and yet the references point to the old one.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;big&gt;&lt;span style='font-family: arial;'/&gt;&lt;/big&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-4275132943475084850?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/4275132943475084850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/11/vs2005-has-feature-supposedly-called.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4275132943475084850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4275132943475084850'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/11/vs2005-has-feature-supposedly-called.html' title='VS2005 has a feature (supposedly) called &amp;quot;Copy Local&amp;quot;'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-9104363625074480083</id><published>2007-11-23T20:13:00.000+05:30</published><updated>2007-11-29T16:41:50.618+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='DLL'/><title type='text'>.NET GAC --- CompileTime v/s Runtime synchronization</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;GAC - Global Assembly Cache is just a run-time thing.&lt;br/&gt;&lt;br/&gt;People familiar with .NET will surely know about GAC. Its just a one stop for any application running on the .NET framework to look for the assemblies (DLLs). When ever we run any .NET application, the framework will look for the referenced assemblies in the GAC. Note that even the version number of the DLL must match. If the application was compiled with an assembly 'A' of version 1.0 and you currently have anything, but 1.0, the application will not run. It needs exactly what it was compiled with. And the best part is that multiple versions can co-exist in the GAC&lt;br/&gt;&lt;br/&gt;But this GAC look up happens only at the run-time. In Visual Studio, we will add the required assemblies for a project under the project references. These references will be pointing to the locations where the assemblies are present on the file-system and may be remote locations in case of web references. When we build the project the compiler will look at these locations and not in the GAC. Now if you are referencing an older assembly but we have a newer version in the GAC, then the project will compile but not run. Because at run-time the framework will look for the older assembly but does not find it in the GAC. So be sure of updating your references when your assembly of a particular version in the GAC is updated or replaced by an assembly of a different version.&lt;br/&gt;&lt;br/&gt;This problem becomes still more evident and a little tricky when we are using an assembly(say assembly 'A') which again depends on another assembly (say assembly 'B'). And in such a case the problem can become evident even before compilation itself(If the assembly 'B' is related to designer of the Visual Studio). Say assembly A-1.0 was built using assembly B-1.0. Now when we use assembly 'A' by adding it as a reference to our project we are using assembly 'A-1.0' that was built using assembly 'B-1.0'. 'B' does not come into picture during compilation at all. When we build our project and run it, the framework looks for 'A-1.0' and finds out that it needs 'B-1.0' and finds both in GAC and runs the application. Here as 'B' does not come into picture during compilation, it is sufficient if we have it GAC, where as 'A-1.0' has to be at some location on the file system (either local or remote). &lt;br/&gt;&lt;br/&gt;Now if 'B' in the GAC is updated, i.e 'B-1.0' is replaced by something like 'B-1.1', and you try to run the previously built application, it fails. Though the assembly referred by you , 'A-1.0' has not changed, the assembly 'B' which is necessary for 'A' has changed. So at runtime the .NET framework will search GAC and the current-folder for 'B-1.0' and as it would not be found, the application fails.&lt;br/&gt;&lt;br/&gt;There are a couple of other posts about GAC and references in VS2005. Look out for those.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-9104363625074480083?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/9104363625074480083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/11/net-gac-compiletime-vs-runtime.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/9104363625074480083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/9104363625074480083'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/11/net-gac-compiletime-vs-runtime.html' title='.NET GAC --- CompileTime v/s Runtime synchronization'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-4847165718388953017</id><published>2007-11-18T05:53:00.000+05:30</published><updated>2010-10-15T04:00:13.907+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gyaan'/><category scheme='http://www.blogger.com/atom/ns#' term='duty'/><category scheme='http://www.blogger.com/atom/ns#' term='humanity'/><category scheme='http://www.blogger.com/atom/ns#' term='swamiji'/><title type='text'>One deadly enemy today’s youth is facing</title><content type='html'>&lt;o:p&gt; &lt;/o:p&gt;This is another thing that swamiji told us during the gyaan transfer. The earlier one was about us all being so lucky. This post is about one of the several reasons why today’s youth is going haywire. As you would hear from any other staunch Hindu or a strong supporter of ancient ways of life, the first reason mentioned by swamiji was “Westernization”. But this term here was not against “Globalization” or international exchange. Swamiji also believes that there are a lot of things that we have to learn from the west and yet a lot more that we should not. But here are a few things that he said about modernization and how it has affected us.  &lt;p class="MsoNormal"&gt;Recent technological advances have almost removed the barrier of distance for communication. This has lead to increased and more frequent talk to our kith and ken. But this is what swamiji said “This technology has increased “Samparka” (communication) but has drastically reduced “Sambandha” (relation)”. This is very much true. With increase in communication the feeling or urge in us to visit our parents or relatives has come down. But this again is a choice. There is nothing like free meal, everything comes at a cost. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;Coming to the enemy that we are facing, a surprisingly simple fact which is neglected is that in most cases the starting salaries of the current youth are very close to the retirement salaries of their parents. Though we can argue that the value of a rupee was much more than what it is now. The world has been through inflation and all that. But despite any inflation, a rise to the extent of retirement salary becoming starting salary is a steep one. This is not just alone. There are strings attached to it. The earning age is lesser than what it used to be and the responsibilities are lesser. All these result in superfluous money staying in the hands of not-so-mature and the so called adventurous youth. This combination of lack of knowledge and excess money is the deadly enemy that today’s youth is facing.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;After listening to this I have realized that I should keep a check on my expenses, by which half of the enemy is under control and do lend my ears to elders to deal with the other half. Hope I am successful and so are the others in the same league as me.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Hari Om.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-4847165718388953017?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/4847165718388953017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/11/one-deadly-enemy-todays-youth-is-facing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4847165718388953017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4847165718388953017'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/11/one-deadly-enemy-todays-youth-is-facing.html' title='One deadly enemy today’s youth is facing'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-383465728251526072</id><published>2007-11-18T01:06:00.000+05:30</published><updated>2010-10-15T04:00:13.965+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gyaan'/><category scheme='http://www.blogger.com/atom/ns#' term='duty'/><category scheme='http://www.blogger.com/atom/ns#' term='humanity'/><category scheme='http://www.blogger.com/atom/ns#' term='swamiji'/><title type='text'>So many of us are so Lucky; but not all are so.</title><content type='html'>&lt;p class="MsoNormal"&gt;Sometime in November I had been to been on a bike trip to Mysore with Pavan.A.C and a couple of his friends. Though I really liked to go on a bike trip to Mysore, this one is something that I will not look forward to have again. The lack of preparation made me really tired and not to mention the dust, the hot wind and the charred faces at the end of the trip. But this blog post is not at all about the trip or the adventure. This is about a discussion that we had with Swami Maheshatmanandaji during our late night debates. Well actually this was more of gyaan transfer than a debate. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;This is one of the several things that he told us. When we were discussing about the facilities provided to us as V’Shala in comparison with students outside we simply agreed that we are a lot lucky than several hundreds and thousands of children studying in other schools. At that time swamiji said that we are way too well off and blessed than what we actually think or just said. It’s not just the extra facilities or amenities available to us that make us the fortunate ones. The very fact we could live a “Student Life” during our childhood is something that a lot of unprivileged and unfortunate children do not get. This was something known to me and did not appear like some hard truth, but the gravity of the words was way stronger than I could imagine. To justify this he cited an example.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;During the last vacations when he had been to bus-stand to see off some students going home, he saw a child in his early teens drunk and swaggering on the road. Well this is the treachery of the nature, I thought. Not all the fingers are same. But the treachery actually runs deeper than this. Swamiji continued and told us that it’s not the boy’s fault at all. The boy, by birth, has every right to be a student, to play like any other child of his age would do, to learn, to experience the joy of learning, to dream of great and big things and make every possible attempt to achieve them. He is deceived of all these. Instead he probably became an unskilled labor doing all sorts of small and petty jobs to earn his meal. Fortunately or unfortunately he got a little extra money which he used to purchase illicit liquor and now he is on the roads, unchecked, unadvised and without and help.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;I protested to this saying that it’s the law of the nature and about he being unadvised, I said that he surely would have been told by someone about leading a healthy and successful life. Swamiji sapped back at me suddenly in strong disagreement. Here are his answers for my protests:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;It’s not the responsibility of the nature. Is it nature that has taken care of us till now? Well it stuck me that parents/guardians are the ones who come into play here. They are the ones who nourish us, take care of us and make sure that we reach good heights and make us capable of leading a respectable life. This is probably what is missing in that boy’s life. Either he is not privileged enough to have a life with his parents or he is not fortunate enough to have parents who can give him a life. And about the advice, only words will not suffice and all that he would have got would be just that. As Swami Vivekananda said “Don’t advise hungry stomachs, they can’t be receptive”, this boy should be first shown some light and then advised to reach that light.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Then I realized what he earlier meant by we being way too privileged than what we talk or think. The only solution is to set a balance in nature and that would be possible only on a one-on-one basis with the privileged youth standing up and deciding to take care of one underprivileged. More about that in another blog post. As of now just realize that if you are reading this you are one of the most privileged in the mankind. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;Hari Om.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-383465728251526072?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/383465728251526072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/11/so-many-of-us-are-so-lucky-but-not-all.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/383465728251526072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/383465728251526072'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/11/so-many-of-us-are-so-lucky-but-not-all.html' title='So many of us are so Lucky; but not all are so.'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-3278437350688154801</id><published>2007-11-13T12:52:00.000+05:30</published><updated>2010-10-15T04:00:14.023+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gyaan'/><category scheme='http://www.blogger.com/atom/ns#' term='Doddappa'/><category scheme='http://www.blogger.com/atom/ns#' term='career'/><category scheme='http://www.blogger.com/atom/ns#' term='business'/><title type='text'>WaterWays - An amazing way of transfer</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Water ways - The most cost effective transport system:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is the outcome ofyet another discussion with Doddappa(Uncle). We were actually about varied careers and how one can be successful and not be yet another engineer or a doctor. Though we came up with a lot of options like being a scientist after doing a masters in pure science or may be be take up journalism and many more, but the one that stood out as an extremely lucrative one was &lt;span style="font-weight: bold;"&gt;Merchant Navy&lt;/span&gt;. Then my sister asked the typical youngster question: "What do these people at Merchat Navy do??!!". That was what my uncle was precisely waiting for, an opportunity, and he started the gyaan transfer.&lt;br /&gt;&lt;br /&gt;Though most of what he said was known to me, there was one thing which struck me like anything. He said that a large part of mass-goods transfer i.e actual large scale business hapened through water-ways because it was the cheapest mode. Though I knew this bit of fact the reason for this interested me more than anything. It is very simple. For roadways we ave to "maintain roads", for railways we have to "maintain rails", for airways though we do not have to "maintain air" its really a costly affair to maintain airports, the air traffic control and hence makes air-transport an ultimately costly choice for transfer of all regular mass usage goods. But with waterways there is no such thing at all. Ships move on waters and seas and oceans take care of that. Traffic control is a lot easier than airways. From what I know fuel is also much cheaper compared to the extremely high quality air-fuel. (So much of comparision with airways is because the others cannot be used for transport across the globe)&lt;br /&gt;&lt;br /&gt;So all that we need to worry about is ports/harbours. i have heard about natural harbours and hence I guess even those costs are partly taken care by Mother nature already. This and so many other things make water ways the obvious choice for shipping large amounts of goods. may be other modes of transport will make transportation charges itself more than the actual cost of the goods being transported.&lt;br /&gt;&lt;br /&gt;Now there might be some environmental considerations that need to be taken care of. Because recently when some American or French ship was coming to Gujarat port for scrapping there was a lot of opposition as it was hazardous and leading to pollution big time. But still cost stands a big deal. I hope our good scientist fellows will soon find a less hazardous and pollution-free shipping ways. :-)&lt;br /&gt;&lt;br /&gt;So businessman and would be businessman, watch out for your shipyard. And also learn how to swim, just in case, you know. ;-)&lt;br /&gt;Hail Water-ways, Hail mother Nature... (Thank god I can swim :P )&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-3278437350688154801?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/3278437350688154801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/11/waterways-amazing-way-of-transfer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/3278437350688154801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/3278437350688154801'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/11/waterways-amazing-way-of-transfer.html' title='WaterWays - An amazing way of transfer'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-6251448899818151220</id><published>2007-11-02T19:35:00.000+05:30</published><updated>2007-11-29T16:42:29.829+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='DLL'/><title type='text'>Registering and UnRegistering a DLL - Two ways</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;There are 2 ways to register a DLL.&lt;br/&gt;Any DLL registration happens through the windows tool Regsvr32.exe present in C:\Windows\System32\&lt;br/&gt;&lt;ul&gt;&lt;li&gt;&lt;span style='font-style: italic;'&gt;The HARD-way: &lt;/span&gt;Using the above tool directly from command line. This is the obvious geekish way. This actually turns out to be simple after some practice. The command would be as per the following specification:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span&gt;&lt;span style='font-family: verdana,geneva,helvetica; font-size: 85%;'&gt;Regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname&lt;br/&gt;/s - Silent; display no message boxes&lt;br/&gt;/u - Unregister server&lt;br/&gt;/i - Call DllInstall passing it an optional [cmdline];&lt;br/&gt;     when used with /u calls dll uninstall&lt;br/&gt;/n - do not call DllRegisterServer; this option must&lt;br/&gt;     be used with /i&lt;br/&gt;&lt;blockquote/&gt;&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;&lt;span style='font-style: italic;'&gt;The EASY-way: &lt;/span&gt;Right-click on the DLL you want to register and open it with the above tool. Again the tool resides in C:\Windows\System32\. Thats it. The DLL if proper would be registered and error messages if any would be shown in an alert box.&lt;/li&gt;&lt;/ul&gt;I do not yet know of a easy way for unregistering a DLL. So for that command line is the way.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-6251448899818151220?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/6251448899818151220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/11/registering-and-unregistering-dll-two.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6251448899818151220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6251448899818151220'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/11/registering-and-unregistering-dll-two.html' title='Registering and UnRegistering a DLL - Two ways'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-1454896019549421219</id><published>2007-10-25T19:14:00.001+05:30</published><updated>2007-12-11T17:41:31.124+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='GSoC'/><title type='text'>First check-in of my code into Mozilla codebase</title><content type='html'>&lt;span style="font-family: arial;"&gt;This was a long awaited post, not by the readers waiting to read this but by me, the author, waiting to write this. This is by far the most important blog post written by me, not for its content but for the moment it describes.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;In a previous post titled "My GSoC 2007 Story" I wrote about how excited I was about this association with Mozilla and about the opportunity to fulfill my long lasting dream of contributing to open source and having credit for some notable software development. But that just the beginning of the fulfillment of the big dream. The way was just shown to me and I was given the map just having the end points of the journey. It was up to me to figure out the way and reach the destination after crossing all the hurdles. I am now proud that I could stand the journey and complete it. This post is the proof and the reward together.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;The journey was of course not smooth as described in my "First Mozilla journey" post. But it was worth it. Now about the day I achieved it. It was 5th Sep 2007, yes Teacher's day here in India. (I guess I should really be thanking my teachers for their teachings as well as blessings). That was when Shawn(sdwilsh) checked in my patch, of course with certain changes to it from him. Here is the check-in comment.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;The end was more tiring and hectic than I initially assumed. My feature was initially targeted for M7, but then due to delay from my side it was re-targeted to M8. Since this was considerably big thing and involved quite a bit of risk the drivers decided that this feature would be in only if it can come in by M8. Things were going pretty well with me working till 10 or 10:30 at the office due to lack of internet connection at home. I used to get a new patch every alternate day or at least hit a dead-end and wait for help from biesi/dmose/sdwilsh or some other person. I ended up adding more stuff to nsDownloadManager class than I thought I would be doing. Every week more than 2 or 3 times I used to discard some done stuff and redo it in different way. This was mainly because of my lack of XPCOM knowledge. Though I was very determined to get it in FF3 it was getting heavier and heavier for me. Thank God, I finally submitted a patch which addressed all the issues mentioned in the comments earlier.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;It was all working and just a few hours (that was 10:30pm here and I had to go home - by bus) before the tree was to close for M8 I figured out that nsIFile.GetSize() was not returning the proper value because of which downlaods were getting corrupted and were of sizes more than the source files. The solution turned out that I had to clone the file to avoid the cached values. This required some effort and I postponed it to next day morning hoping to get it done before the tree closed. Though dmose told me to do it right away so that a review can be done that day itself and the patch would go in. But it was too late for me and I just left the office against all my wishes to stay overnight and work with those guys struggling in US. All the way to home I was cursing myself as I was not confident of getting it done in couple of hours and hence I might lead to this feature being dropped from FF3. That would have been like a big blow to me as I had widely publicized this among many of my friends.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;The scene on the other end was also pretty similar. sdwilsh and Mardak spent almost the whole debugging my patch and figuring out what was happening. dmose had mentioned earlier itself that the management wanted this feature though it was not in the FF3 PRD. Lots of people had already blogged about this feature in FF3 and hence it was very critical. They finally figured out that the "http referrer" was also needed for resume to work properly and they added that also to the DB and sdwilsh came up with a new patch and probably got it reviewed by Mano.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;When I came back in the morning the new patch was ready and the whole of mozilla team worldwide was active as lots of check-ins were to be done before midnight. sdwilsh finally got mconnor to review the patch. Since it was patch which was r+ by sdwilsh, mconnor could not find any flaw except for a comment about the file cloning to be made more clear. It was finally made and sdwilsh told me that he would be checking in that patch. I was very much excited and I had every right to be. After 3 months of work, several night outs discussing stuff with my US counterparts and much other effort had gone into bringing out the code in that patch. And finally when sdwilsh put the cvs check-in output on the bug I was so relieved. I knew that it would take an hour atleast for the new code to be picked up by mxr. After an hour I visited mxr to see my name in the contributors list. I copied the link to the line with my name in the nsDownloadManager.cpp and put it as my status message in GMail chat and Gtalk.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;It was a great learning experience for me and a much greater sense of achievement.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Thanks again, Google and Mozilla.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;I now continue to be a part of this awesome community and contribute whenever I can. After this success I took up the job of providing resume support for "Open With" kind of downloads. More about that in another post.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Shree Yalaguresh Prasanna.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Hari Om.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-1454896019549421219?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/1454896019549421219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/10/first-check-in-of-my-code-into-mozilla_25.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1454896019549421219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1454896019549421219'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/10/first-check-in-of-my-code-into-mozilla_25.html' title='First check-in of my code into Mozilla codebase'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-5073591476750984863</id><published>2007-10-17T16:54:00.000+05:30</published><updated>2010-10-15T04:00:14.066+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gyaan'/><category scheme='http://www.blogger.com/atom/ns#' term='Doddappa'/><category scheme='http://www.blogger.com/atom/ns#' term='career'/><title type='text'>Theory X and Theory Y</title><content type='html'>This is yet another discussion that I had with my Doddappa(uncle). The title seems to be a very interesting and something exciting. Even I felt the same when my uncle first mentioned it. But it eventually turned out that it was a very much common and known thing. Then why the hell am I writing about this here?? Well the answer is, I did not know that such a common thing could be documented so well and that it would be on of the most important management theories.&lt;br /&gt;&lt;br /&gt;There is a nice Wikipedia article about this: &lt;a href="http://en.wikipedia.org/wiki/Theory_X_and_theory_Y"&gt;http://en.wikipedia.org/wiki/Theory_X_and_theory_Y&lt;/a&gt; and hence I will not be writing anything about this here.&lt;br /&gt;&lt;br /&gt;In short Theory X is the pessimistic view and Y is the optimistic view about the people you are managing. But in reality people at any place are really a mix of this and are generally somewhere in between these two extremes. So the manager needs to shrewed enough to identify and categorize people and manage them accordingly. Because X-type of management will piss-off the Y-type of people and may result in resource loss. The reason is that self motivated and creative people want freedom and do not like to be persistently nagged. On the other hand Y-type of management for X-type of people will result in zero or close to zero output and the manager's neck is on the blade. The reason simply being that lazy people who are at work just for money and exploit all facilities will just do that and refrain from working. So managers and people aspiring to be managers, though this is a very common and old and also a sort of outdated philosophy my guess is that it still is an important one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-5073591476750984863?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/5073591476750984863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/10/theory-x-and-theory-y.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5073591476750984863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/5073591476750984863'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/10/theory-x-and-theory-y.html' title='Theory X and Theory Y'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-4303660401024554974</id><published>2007-10-16T17:01:00.000+05:30</published><updated>2010-10-15T04:00:14.092+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gyaan'/><category scheme='http://www.blogger.com/atom/ns#' term='planning'/><category scheme='http://www.blogger.com/atom/ns#' term='time management'/><category scheme='http://www.blogger.com/atom/ns#' term='career'/><title type='text'>Basic Planning Gyaan</title><content type='html'>I recently completed my graduation in Computer Science and Engineering and started my career at National Instruments R&amp;amp;D as a Software Engineer. There are a lot of things that I learnt here in first few days. Of course I cannot put all of that here. But I can indeed put some most generic things, things mostly known to all or at least a lot of people. This post has something like that. The freshers here (one of whom was me) had a meeting with our manager for a particular thing. We discussed a lot of things out which I found few interesting and have put them here. These are mainly management related stuff like how a professional should lead his/her professional life. Pretty simple but very important things. These things are very essential for any organization to be successful.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Don't push things , rather take things on. Take Responsibilities . &lt;/span&gt;&lt;br /&gt; -- This is the good old thing which told us not to put the blame on someone else when we do not succeed. Its just put in a different way. Whenever we have task facing us we should always go for it rather than shun it away waiting for someone else to take it. We should realize that the more we work the more we grow. Its always a +ve things to take up responsibility than to drop them or avoid them.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Always Under Commit , Over Deliver .&lt;br /&gt; -- &lt;/span&gt;The previous point tells us to take up work. But what it does not speak about is that whatever is taken up must be completed &lt;span style="font-weight: bold;"&gt;in time. &lt;/span&gt;When accepting a job, when committing for something we should make sure we got enough room for this new thing and it is not going to affect our previous schedules and commitments. And also when finalizing deadline we should think of unforeseen  situations and obstacles and plan accordingly. Have some buffer time reserved. Hence we should always under commit and try and work hard to over deliver. This point might seem contradicting to the previous one but both are to be balanced well to go up the ladder.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Don't randomly oscillate on days . Divide your day properly&lt;/span&gt;.&lt;br /&gt; -- This is the discipline part. Every day has to be productive. At the end of each day when you ask yourself about that day's outcome you must have a valid answer. And this can happen only when we properly plan the day. Planning plays a crucial role even in a day's work. So instead of spending the day trying to do a lot things, we better plan the day. Tools like post-it reminers, or an online dairy or a calendar or some other form of To-Do list will come a long way in making the day fruitful. So the first thing you got to do when you move in daily is to list down the tasks you plan to do that day. Something like 5 to 10  minutes should be sufficient for this. Be sure to note these things so as to verify later. Start work as per plan. Note down any new thing that you come across in the middle of the day. Then close to the end of the day, say around an hour before you leave verify whether you accomplished all the listed tasks. If some critical things were left out then complete them before you leave. Or may be you can postpone the less important ones to a further date.&lt;br /&gt;What is more important to a plan to work is that it should be followed. So once you have a plan for the day follow it. And follow it as closely as possible. Do not oscillate between multiple things at a time.  For example - if you are focussing on something very seriously, just don't start browsing. That will put you out of the frame(of course unless you have some real good control over thoughts and mind).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Plan everything well for the time you spend out of the office as well.&lt;/span&gt;&lt;br /&gt; -- Our personal life affects our professional life almost in every aspect and the converse is also true. If we can't get things done on time in office we end up staying late and that annoys people at home. They start cribbing, telling us why we are late daily and all that stuff. That obviously makes us angry and we lose the mental balance. And when we are in office with such a mind we do things in a much worse way and the cycle goes on. So we better plan things for our personal life also. Just to make sure that we are successful everywhere.&lt;br /&gt;&lt;br /&gt;These are a sort of &lt;span style="font-weight: bold;"&gt;Golden Rules &lt;/span&gt;for anyone who aspires to be successful. At least that is what I feel. I of course have started following these and it has helped me a lot.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-4303660401024554974?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/4303660401024554974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/10/basic-planning-gyaan.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4303660401024554974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/4303660401024554974'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/10/basic-planning-gyaan.html' title='Basic Planning Gyaan'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-1124149955636884588</id><published>2007-10-16T16:01:00.000+05:30</published><updated>2007-12-11T17:40:13.075+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='Tweaks'/><category scheme='http://www.blogger.com/atom/ns#' term='code performace'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='GSoC'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='Bookmarks'/><title type='text'>Mozilla - Bookmarks' keywords &amp; Quick Searches</title><content type='html'>&lt;div style="font-family: arial;" xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;big&gt;&lt;span style="font-size:85%;"&gt;This world is really full of amazing things. How much ever we discover and find out, there will be something interesting just right next to us which we would not have figured out. This post is about one such thing, which was right here from such a long time and I had not figured it out.&lt;br /&gt;&lt;br /&gt;The first hints for this came to me when I saw one of my colleagues, Pramod S, at NI using shortforms for Google(g) and Wikipedia(wp) when searching. I thought he had come across some hack and tweaked his browser. But just today I realized that it is infact a feature in Firefox.&lt;br /&gt;&lt;br /&gt;For any URL or webpage that we bookmark we can assign a keyword, a shortform, which can be entered in the URL bar to visit that bookmarked page. This is really a very useful things if we visit certain pages over and over again. In my case &lt;a href="http://mxr.mozilla.org/seamonkey/"&gt;http://mxr.mozilla.org/seamonkey/&lt;/a&gt; is one site that I cannot live without. So I have keywords for the 3 different searches available at this page, viz:&lt;br /&gt;&lt;/span&gt;&lt;/big&gt;&lt;ul&gt;&lt;li&gt;&lt;big&gt;&lt;span style="font-size:85%;"&gt;mxrf - for file search(find)&lt;/span&gt;&lt;/big&gt;&lt;/li&gt;&lt;li&gt;&lt;big&gt;&lt;span style="font-size:85%;"&gt;mxri - for identifier search&lt;/span&gt;&lt;/big&gt;&lt;/li&gt;&lt;li&gt;&lt;big&gt;&lt;span style="font-size:85%;"&gt;mxrt - for free form text search&lt;/span&gt;&lt;/big&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;big&gt;&lt;span style="font-size:85%;"&gt;This feature is really handy and increases the brwosing speed to a great extent. &lt;/span&gt;&lt;/big&gt;&lt;/p&gt;&lt;p&gt;&lt;big&gt;&lt;span style="font-size:85%;"&gt;How to get this working? or how to assign the keywords?. This again is really simple. For existing bookmarks just go to the Bookmark properties by Right-Clicking on that and you get a small dialog with a text field for Keyword. Key in whatever you want and click on OK. Thats it you are ready to fire the internet with your keywords. For new bookmarks it is still easier. When you are creating a bookmard with the helper dialog you get the keyword field which you can key in or leave it blank (either to be filled later or not to be filled at all).&lt;/span&gt;&lt;/big&gt;&lt;/p&gt;&lt;p&gt;&lt;big&gt;&lt;span style="font-size:85%;"&gt;This is not the end. There is yet another enhancement to this. Certain bookmarked urls have query strings, as in case of search urls. The google url: &lt;a href="http://www.google.com/"&gt;http://www.google.com/&lt;/a&gt; is followed by a query string of the form "&lt;em&gt;search?hl=en&amp;amp;q=search string&lt;/em&gt;" which carries the search string entered. Such strings work with the keywords also. Meaning you can search for something on google using the keyword, &lt;strong&gt;'g' &lt;/strong&gt;like this:&lt;/span&gt;&lt;/big&gt;&lt;/p&gt;&lt;p&gt;&lt;big&gt;&lt;span style="font-size:85%;"&gt;"g &lt;em&gt;any-search-string" &lt;/em&gt;. This will be converted to appropriate URL with a proper query string as specified in the bookmark properties. As it appears this of course requires a little bit of extra work. When saving an URL as bookmark, for instance when saving &lt;a href="http://www.google.com/"&gt;http://www.google.com/&lt;/a&gt; you can save it along with the query string, but the search string being substituted by &lt;strong&gt;"&lt;em&gt;%s&lt;/em&gt;" &lt;/strong&gt;and whatever string you specify with the keyword will replace every occurance of &lt;strong&gt;&lt;em&gt;%s&lt;/em&gt;&lt;/strong&gt; in the URL. So this is how the bookmark URL will look like:&lt;/span&gt;&lt;/big&gt;&lt;/p&gt;&lt;p&gt;&lt;big&gt;&lt;span style="font-size:85%;"&gt;&lt;a href="http://www.google.com/search?hl=en&amp;amp;q=%s"&gt;http://www.google.com/search?hl=en&amp;amp;q=%s&lt;/a&gt; ---- with &lt;strong&gt;&lt;em&gt;g &lt;/em&gt;&lt;/strong&gt;as the keyword. Now when using this bookmark, if you enter something like this in the URL bar:&lt;/span&gt;&lt;/big&gt;&lt;/p&gt;&lt;p&gt;&lt;big&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;&lt;em&gt;"g bookmarks&lt;/em&gt;&lt;/strong&gt; " &lt;strong&gt;&lt;em&gt;-- &lt;/em&gt;&lt;/strong&gt;this becomes-- &lt;a href="http://www.google.com/search?hl=en&amp;amp;q=bookmarks"&gt;http://www.google.com/search?hl=en&amp;amp;q=bookmarks&lt;/a&gt; -- and finally giving you search results for bookmarks.&lt;/span&gt;&lt;/big&gt;&lt;/p&gt;&lt;p&gt;&lt;big&gt;&lt;span style="font-size:85%;"&gt;Now this is how I have arranged my mxr bookmarks:&lt;/span&gt;&lt;/big&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;big&gt;&lt;span style="font-size:85%;"&gt;&lt;a href="http://mxr.mozilla.org/seamonkey/find?string=%s"&gt;http://mxr.mozilla.org/seamonkey/find?string=%s&lt;/a&gt; -- with keyword: &lt;strong&gt;mxrf&lt;/strong&gt;&lt;/span&gt;&lt;/big&gt;&lt;/li&gt;&lt;li&gt;&lt;big&gt;&lt;a href="http://mxr.mozilla.org/seamonkey/ident?string=%s"&gt;&lt;span style="font-size:85%;"&gt;http://mxr.mozilla.org/seamonkey/ident?string=%s&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt; -- with keyword: &lt;strong&gt;mxri&lt;/strong&gt;&lt;/span&gt;&lt;/big&gt;&lt;/li&gt;&lt;li&gt;&lt;big&gt;&lt;a href="http://mxr.mozilla.org/seamonkey/text?string=%s"&gt;&lt;span style="font-size:85%;"&gt;http://mxr.mozilla.org/seamonkey/text?string=%s&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt; -- with keyword: &lt;strong&gt;mxrt&lt;/strong&gt;&lt;/span&gt;&lt;/big&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;big&gt;&lt;span style="font-size:85%;"&gt;Now does this method appear too complex and cumbersome? Well mozillians come to your rescue yet again. You can save such enhanced search bookmarks called "Quick Search" bookmarks very easily like this:&lt;/span&gt;&lt;/big&gt;&lt;/p&gt;&lt;p&gt;&lt;big&gt;&lt;span style="font-size:85%;"&gt;Go to the search page and Right-Click on the search bar, and click on: &lt;strong&gt;&lt;em&gt;"Add a keyword for this search"&lt;/em&gt;&lt;/strong&gt; . That will give you the small bookmarking dialog, with a field for keyword. All that you have to do is to just enter the keyword that you want and click on OK. All the URL, query string and %s headache is taken care by Mozilla. &lt;/span&gt;&lt;/big&gt;&lt;/p&gt;&lt;p&gt;&lt;big&gt;&lt;span style="font-size:85%;"&gt;Well mozilla is here just to make your browsing experience easier, safer and worthwhile., isn't it?&lt;/span&gt;&lt;/big&gt;&lt;/p&gt;&lt;p&gt;&lt;big&gt;&lt;span style="font-size:85%;"&gt;And I am proud to be associated with this awesome community. ;-)&lt;/span&gt;&lt;/big&gt;&lt;/p&gt;&lt;p&gt;&lt;big&gt;&lt;span style="font-size:85%;"&gt;Happy and &lt;em&gt;Fast&lt;/em&gt; Browsing.&lt;/span&gt;&lt;/big&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-1124149955636884588?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/1124149955636884588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/10/mozilla-bookmarks-keywords-quick.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1124149955636884588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1124149955636884588'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/10/mozilla-bookmarks-keywords-quick.html' title='Mozilla - Bookmarks&amp;#39; keywords &amp;amp; Quick Searches'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-6556175392970697838</id><published>2007-10-16T11:28:00.000+05:30</published><updated>2007-10-16T16:41:02.341+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='code performace'/><title type='text'>Subtle things about s/w code Performance</title><content type='html'>Any software product is first benchmarked for its performance before it is shipped out. No company/developer wants complains about the performance of the product from its users. This one single thing can make the users to simply move away to another better performing product. And moreover such a complaint would mean inefficient coding and to some extent incompetence of the developers, which we software developers can't really take.&lt;br /&gt;&lt;br /&gt;Performance is generally measured with 2 parameters:&lt;br /&gt;1) Time taken by the application&lt;br /&gt;2) Memory consumed by the application&lt;br /&gt;&lt;br /&gt;Typically, on current day Desktop systems the memory criteria is almost ruled out, unless the application is really memory consuming like 3D games and other high end stuff.&lt;br /&gt;&lt;br /&gt;But time has always been a concern. So many algorithms are developed to solve the same problem, with each algorithm being a good choice under some set of conditions. Those are all the high-funda things involving Math, mainly things like: O(n), Exponential complexity etc, etc..&lt;br /&gt;&lt;br /&gt;Apart from these there are a lot of very small things, which appear as very trivial and insignificant but eventually make a lot of difference. I learnt about 2 such things at my work place NI, yesterday when I was working on my first task here. I of course cannot speak of the nature of my work and what exactly I was doing. Here are the generic things that I learnt:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;1) Avoid calling a function in a loop, instead pass the data you are iterating in the&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;loop to the function being called.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Suppose you have a large amounts of data to be processed and you have helper processing function and an actual processing function. The most common way of accomplishing such a task would be to iterate through the data in the helper function and for every single instance of the data call the actual data processing function. This can be optimized to a great extent in a lot of cases. By iterating through the data in the helper function and calling the actual function we introduce a lot of function-call overhead, which obviously eats up a major chunk of time. If possible, which it indeed is in many cases, we should instead pass the large data chunk to the actual data processing function and iterate over there and make the necessary processing then and there itself as and when we fetch an instance of the data.&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;PS: By data instance here I mean one data unit. Something like an element if the data chunk is an array. If it is an array of structures, then one data instance would be a structure.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;This way we reduce the overhead caused due to extensive function calls and there by improving the performance.&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;2) If we have an &lt;span style="FONT-WEIGHT: bold"&gt;if/else &lt;/span&gt;block which is hit a lot of times continuously, then we should have the code for the most probably case in the &lt;span style="FONT-WEIGHT: bold"&gt;if &lt;/span&gt;block.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;This is particularly interesting. Yesterday when my tech lead told me about this, I was really surprised that optimization can be done at this level. I liked this very much.&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;/span&gt;&lt;span style="FONT-STYLE: italic"&gt;&lt;/span&gt;Consider the following code fragment:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;for ( execute some times) {&lt;br /&gt;if (aCondition) {&lt;br /&gt;.....&lt;br /&gt;.....&lt;br /&gt;} else {&lt;br /&gt;......&lt;br /&gt;......&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;Something like above when compiled into machine language would look like this:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="FONT-STYLE: italic"&gt;loopLabel: instruction for condition check;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-STYLE: italic"&gt;JMP if false to&lt;/span&gt; &lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-STYLE: italic"&gt;elseLabel&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;code for true case (if block)&lt;span style="FONT-STYLE: italic"&gt;&lt;/span&gt;&lt;br /&gt;some more code for true case&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-STYLE: italic"&gt;loop condition check&lt;br /&gt;JMP to loopLabel if true&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;elseLabel: code for false case (else block)&lt;br /&gt;some more code for false case&lt;br /&gt;loop condition check&lt;br /&gt;JMP to loopLabel if true&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;This is how the assembly code would look like.&lt;br /&gt;Here the &lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;if/else &lt;/span&gt;&lt;/span&gt;block is repeatedly hit as it is in a loop and is the main body of the loop. In the assembly code when the &lt;span style="FONT-STYLE: italic"&gt;if condition &lt;/span&gt;turns out to be true the code for true case is execute and then a JMP is made to loop beginning. &lt;span style="FONT-WEIGHT: bold; FONT-STYLE: italic"&gt;BUT, &lt;/span&gt;but, in case of else there will be &lt;span style="FONT-WEIGHT: bold"&gt;"2" JMP &lt;/span&gt;instructions - one to go to the else block and another to go back to loop beginning. This double jump obviously is an overhead and takes more time for execution. Hence we should try and design the &lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;if/else &lt;/span&gt;&lt;/span&gt;in a such a way the code for the most common or most probable case to be put in the &lt;span style="FONT-STYLE: italic"&gt;if &lt;/span&gt;block, so that a maximum part of the execution happens only with a single jump.&lt;br /&gt;&lt;br /&gt;This might seem so stupid or so subtle that may lead to the thinking that the performance gain with this trick is almost negligible. Its not so. Believe me, the gain is really good in most cases where the &lt;span style="FONT-WEIGHT: bold"&gt;&lt;span style="FONT-STYLE: italic"&gt;if/else &lt;/span&gt;&lt;/span&gt;block is repeatedly hit.&lt;br /&gt;&lt;br /&gt;So stop jumping around and start improving your code. ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-6556175392970697838?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/6556175392970697838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/10/performance-improvement-in-ifelse.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6556175392970697838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/6556175392970697838'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/10/performance-improvement-in-ifelse.html' title='Subtle things about s/w code Performance'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-1842863281600958505</id><published>2007-09-12T10:42:00.000+05:30</published><updated>2010-10-15T04:00:14.110+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gyaan'/><category scheme='http://www.blogger.com/atom/ns#' term='Doddappa'/><category scheme='http://www.blogger.com/atom/ns#' term='career'/><title type='text'>Learn to say NO , Learn to be harsh</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Doddappa &amp; General Dyer&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is one of the several discussions or talks that I had with my Doddappa (Uncle). It was during and after supper (during mine and after his.. though we started together). He just started with the JalianWala Bagh incident which happened before Indian Independence. Just to recall, a large number of Sikhs had gathered in this place JalianWala Bagh for a religious meeting (from what I know). At that time General Dyer had issued a notice that no public meetings could be held, as it was a sign of freedom struggle and the British always wanted to avoid a full fledged opposition to their rule. When General Dyer became aware of this religious meeting he came with a troop of gunmen and positioned them behind the Sikhs covering the only the entrance to the enclosed JalianWala Bagh ground where they had assembled. He gave a warning telling the people there to clear before his countdown ends. The Sikhs did not budge and the General ordered the troops to open fire on the people. He killed almost all of the Sikhs present there. Some say the number was hundreds and some say it was thousands. Whatever it is, I am pretty sure it was big number.&lt;br /&gt;&lt;br /&gt;There was a lot of opposition and revolt after this incidence in a lot of places in India. Also there was a great big opposition in England also, about the action of General Dyer. So the British, fair in governance as they few call them, formed a committee to investigate the matter. The committee had Indian(s) too. &lt;br /&gt;&lt;br /&gt;It started with the General Dyer being questioned. When he was asked for a reason to take in a troop of gunmen inside that enclosed area, he said "The entrance was too small for my tanker/automated firearm weapon to move in. Thats why I had to finish the job with few gunmen". This might enrage the Indians, but there is a lesson to be learnt here.&lt;br /&gt;&lt;br /&gt;Never in the interrogation did he confess that he did a mistake. Never was he sorry that he killed so many people. Not even through out his life. Any time he was asked about that incident he said "I was just protecting the queen. I was following my orders. I just did my duty". Never did he regret that action of his and he always considered that he had discharged his duty properly.&lt;br /&gt;&lt;br /&gt;Each one of us will face a similar scenario in our careers. We will come across situations when we are supposed to make harsh statements or we receive such harsh comments. In either cases, it that was the need of the hour then we should never regret about the situation. Sometime a senior of ours may scold us or make certain negative remarks. If those are justified then all that he has done is his job. He would have failed in his duties if he had not done that. This justification is again a very difficult thing. Not all would be ready to accept any such thing told. The very first reaction would be think that its wrong. But a proper thinking with a cool mind will sort out the things.&lt;br /&gt;&lt;br /&gt;On the other hand there might be a situation when we are supposed to speak like that or make certain hard decisions. If that is in the best interest of all then we should never hesitate to do it. The person at the receiving end may consider us to be rude, but we know we are not. All that we have done is dischared our duties. This is the harder part. And this is what we have to learn from the above mentioned incident in the life of General Dyer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375315255567275930-1842863281600958505?l=techbrahmana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbrahmana.blogspot.com/feeds/1842863281600958505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbrahmana.blogspot.com/2007/09/learn-to-say-no-learn-to-be-harsh.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1842863281600958505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375315255567275930/posts/default/1842863281600958505'/><link rel='alternate' type='text/html' href='http://techbrahmana.blogspot.com/2007/09/learn-to-say-no-learn-to-be-harsh.html' title='Learn to say NO , Learn to be harsh'/><author><name>Brahmana (Srirang)</name><uri>http://www.blogger.com/profile/10677241604486586254</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375315255567275930.post-4335840306533597671</id><published>2007-07-12T14:45:00.000+05:30</published><updated>2010-10-15T04:00:14.150+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech-also'/><category scheme='http://www.blogger.com/atom/ns#' term='memories'/><category scheme='http://www.blogger.com/atom/ns#' term='hostel'/><category scheme='http://www.blogger.com/atom/ns#' term='career'/><title type='text'>IBM Internship: Part I: The Interview</title><content type='html'>&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Cindoddis%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"&gt;&lt;link rel="themeData" href="file:///C:%5CDOCUME%7E1%5Cindoddis%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"&gt;&lt;link rel="colorSchemeMapping" href="file:///C:%5CDOCUME%7E1%5Cindoddis%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:trackmoves/&gt;   &lt;w:trackformatting/&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:donotpromoteqf/&gt;   &lt;w:lidthemeother&gt;EN-US&lt;/w:LidThemeOther&gt;   &lt;w:lidthemeasian&gt;X-NONE&lt;/w:LidThemeAsian&gt;   &lt;w:lidthemecomplexscript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:splitpgbreakandparamark/&gt;    &lt;w:dontvertaligncellwithsp/&gt;    &lt;w:dontbreakconstrainedforcedtables/&gt;    &lt;w:dontvertalignintxbx/&gt;    &lt;w:word11kerningpairs/&gt;    &lt;w:cachedcolbalance/&gt;   &lt;/w:Compatibility&gt;   &lt;m:mathpr&gt;    &lt;m:mathfont val="Cambria Math"&gt;    &lt;m:brkbin val="before"&gt;    &lt;m:brkbinsub val="--"&gt;    &lt;m:smallfrac val="off"&gt;    &lt;m:dispdef/&gt;    &lt;m:lmargin val="0"&gt;    &lt;m:rmargin val="0"&gt;    &lt;m:defjc val="centerGroup"&gt;    &lt;m:wrapindent val="1440"&gt;    &lt;m:intlim val="subSup"&gt;    &lt;m:narylim val="undOvr"&gt;   &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"&gt;   &lt;w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"&gt;   &lt;w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 1"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 2"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 3"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 4"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 5"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 6"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 7"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 8"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 9"&gt;   &lt;w:lsdexception locked="false" priority="35" qformat="true" name="caption"&gt;   &lt;w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"&gt;   &lt;w:lsdexception locked="false" priority="1" name="Default Paragraph Font"&gt;   &lt;w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"&gt;   &lt;w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"&gt;   &lt;w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"&gt;   &lt;w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Revision"&gt;   &lt;w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"&gt;   &lt;w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"&gt;   &lt;w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="
