<?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-5140727620705143469</id><updated>2011-04-21T13:06:52.640-07:00</updated><title type='text'>Kerry's Open Source@Seneca Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kmsingh.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kmsingh.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Kerry</name><uri>http://www.blogger.com/profile/00365498341161954298</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>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5140727620705143469.post-2878372981854948586</id><published>2008-02-15T11:21:00.000-08:00</published><updated>2008-12-11T14:08:37.797-08:00</updated><title type='text'>Mozilla Project Update: Release v.03</title><content type='html'>&lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box#Release_v.03"&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Mozilla Project: Localized Search in Firefox Search Box - Release v.03&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My objective for this release was to dynamically "Remove" a search engine that Firefox 3 (i.e. Minefield) dynamically "Added" from a web site with a search plugin. I achieved this by building on my work from &lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box#Release_v.02"&gt;Release v.02&lt;/a&gt;, which dynamically "Adds" a search engine when Firefox 3 loads a web page with a search plugin.&lt;br /&gt;&lt;br /&gt;The dynamic addition and removal of search engines presents some challenges when considering the user interface design. A few things that I considered were how to change the functionality of the searchbar while keeping it helpful and intuitive to use. I believe that it is important to keep features relatively simple and easy to use while providing some good utilitarian value to the user's web browsing experience, and not making the feature too obtrusive to the user. There are probably many Firefox users who are not aware of the searchbar's current ability to auto-detect &lt;a href="http://developer.mozilla.org/en/docs/Creating_OpenSearch_plugins_for_Firefox#OpenSearch"&gt;OpenSearch&lt;/a&gt; plugins. Hopefully, by extending the searchbar's functionality, it will enable users to gain more benefit from it.&lt;br /&gt;&lt;br /&gt;I arrived at a release that dynamically "Adds" a search engine when Firefox 3 navigates to a site with an OpenSearch search plugin. The newly added engine appears as the current engine on the searchbar and it can be used to search the web site. Click on images below to enlarge them.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_wD0Sz7ZZ0kg/R8d6uI09P7I/AAAAAAAAACM/KtNh7RKc8QY/s1600-h/releasev03_ss01.png"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_wD0Sz7ZZ0kg/R8d6uI09P7I/AAAAAAAAACM/KtNh7RKc8QY/s400/releasev03_ss01.png" alt="" id="BLOGGER_PHOTO_ID_5172237630120476594" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If still on the site with the search plugin, the search engine is placed on the list of available engines as an "Add &amp;lt;Search Engine&amp;gt;" searchbar menu item when the user opens the searchbar popup.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_wD0Sz7ZZ0kg/R8d7r409P9I/AAAAAAAAACc/QgoIjwlOrQM/s1600-h/releasev03_ss05.png"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_wD0Sz7ZZ0kg/R8d7r409P9I/AAAAAAAAACc/QgoIjwlOrQM/s400/releasev03_ss05.png" alt="" id="BLOGGER_PHOTO_ID_5172238690977398738" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;When the user navigates to a different web site, the search engine will be dynamically removed and will not appear on the searchbar menu.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_wD0Sz7ZZ0kg/R8d8m409P-I/AAAAAAAAACk/YY2zgTis3F0/s1600-h/releasev03_ss00.png"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_wD0Sz7ZZ0kg/R8d8m409P-I/AAAAAAAAACk/YY2zgTis3F0/s400/releasev03_ss00.png" alt="" id="BLOGGER_PHOTO_ID_5172239704589680610" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The user can navigate to a web site with an OpenSearch plugin and manually "Add" the search engine.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_wD0Sz7ZZ0kg/R8YsZrhg0rI/AAAAAAAAABk/gR0Ezo3c-FI/s1600-h/releasev03_ss05.png"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_wD0Sz7ZZ0kg/R8YsZrhg0rI/AAAAAAAAABk/gR0Ezo3c-FI/s400/releasev03_ss05.png" alt="" id="BLOGGER_PHOTO_ID_5171870041773232818" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The manually added engine will not be dynamically removed from the installed engines list on the searchbar when the user navigates to a different web site.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_wD0Sz7ZZ0kg/R8Yssrhg0sI/AAAAAAAAABs/qULfraQ7RZA/s1600-h/releasev03_ss06.png"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_wD0Sz7ZZ0kg/R8Yssrhg0sI/AAAAAAAAABs/qULfraQ7RZA/s400/releasev03_ss06.png" alt="" id="BLOGGER_PHOTO_ID_5171870368190747330" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The user may "Remove" the search engine as usual.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_wD0Sz7ZZ0kg/R8YtcLhg0tI/AAAAAAAAAB0/8lAt7aIuJHQ/s1600-h/releasev03_ss07.png"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_wD0Sz7ZZ0kg/R8YtcLhg0tI/AAAAAAAAAB0/8lAt7aIuJHQ/s400/releasev03_ss07.png" alt="" id="BLOGGER_PHOTO_ID_5171871184234533586" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The removed engine appears as an "Add &amp;lt;Search Engine&amp;gt;" searchbar menu item when the user opens the searchbar popup.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_wD0Sz7ZZ0kg/R8Yt47hg0uI/AAAAAAAAAB8/SPs_oJ5pAfE/s1600-h/releasev03_ss08.png"&gt;&lt;img style="cursor: pointer;" src="http://4.bp.blogspot.com/_wD0Sz7ZZ0kg/R8Yt47hg0uI/AAAAAAAAAB8/SPs_oJ5pAfE/s400/releasev03_ss08.png" alt="" id="BLOGGER_PHOTO_ID_5171871678155772642" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The removed search engine will not appear on the searchbar menu after the user navigates to a different web site.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_wD0Sz7ZZ0kg/R8YuHbhg0vI/AAAAAAAAACE/kzYoLEnrjt8/s1600-h/releasev03_ss09.png"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_wD0Sz7ZZ0kg/R8YuHbhg0vI/AAAAAAAAACE/kzYoLEnrjt8/s400/releasev03_ss09.png" alt="" id="BLOGGER_PHOTO_ID_5171871927263875826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Excerpts of JavaScript code from the &lt;a style="font-weight: bold;" href="http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box:_Release_v.03#Patch_File_-_localsearchpatch_v03.txt"&gt;patch file&lt;/a&gt; are discussed and shown below.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box:_Release_v.03#Patch_File_-_localsearchpatch_v03.txt"&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Patch File Code Discussion - &lt;/span&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Release v.03&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.js"&gt;&lt;span style="font-weight: bold;"&gt;File: browser.js&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.js#2771"&gt;&lt;span style="font-weight: bold;"&gt;addEngine() function: &lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If the auto-detected search plugin is &lt;span style="font-weight: bold;"&gt;NOT&lt;/span&gt; on the search service's list of engines, then dynamically "Add" the search engine and assign it to the &lt;span style="font-style: italic;"&gt;addedEngine&lt;/span&gt; local variable. Set the search service's &lt;span style="font-style: italic;"&gt;dynamicEngine&lt;/span&gt; attribute to the value of the newly added engine.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var searchService = Cc["@mozilla.org/browser/search-service;1"].&lt;br /&gt;                    getService(Ci.nsIBrowserSearchService);&lt;br /&gt;if (searchService.getEngineByName(engine.title))&lt;br /&gt;hidden = true;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;else {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  // Dynamically "Add" the web site's search engine plugin.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  var addedEngine = searchService.addEngine(engine.href, Components.interfaces.nsISearchEngine.DATA_XML, iconURL, false);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  if (addedEngine) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    searchService.dynamicEngine = addedEngine;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    hidden = true;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.js#3853"&gt;&lt;span style="font-weight: bold;"&gt;startDocumentLoad() function:&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;When the user navigates to a different web site, get an instance of &lt;span style="font-weight: bold;"&gt;nsIBrowserSearchService&lt;/span&gt; and assign it to the variable &lt;span style="font-style: italic;"&gt;searchService.&lt;/span&gt; Get the search service's &lt;span style="font-weight: bold;"&gt;dynamicEngine&lt;/span&gt; attribute and assign it to the &lt;span style="font-style: italic;"&gt;dynamicEngine&lt;/span&gt; local variable. Then, if &lt;span style="font-style: italic;"&gt;dynamicEngine&lt;/span&gt; has a non-null value, use the search service's &lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/components/search/nsSearchService.js#2741"&gt;&lt;span style="font-weight: bold;"&gt;removeEngine() function&lt;/span&gt;&lt;/a&gt; to remove it from the list.&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;var searchService = Cc["@mozilla.org/browser/search-service;1"].&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;                        getService(Ci.nsIBrowserSearchService);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;var dynamicEngine = searchService.dynamicEngine;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;// Remove the dynamically added search engine if it is on the list.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  if (dynamicEngine)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    searchService.removeEngine(dynamicEngine);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/components/search/nsIBrowserSearchService.idl"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;File: nsIBrowserSearchService.idl&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/components/search/nsIBrowserSearchService.idl#196"&gt;&lt;span style="font-weight: bold;"&gt;addEngine() Interface:&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Change the return type of the interface from &lt;span style="font-weight: bold;"&gt;void&lt;/span&gt; to an &lt;span style="font-weight: bold;"&gt;nsISearchEngine&lt;/span&gt; object.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;* @returns the created engine.&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  nsISearchEngine addEngine(in AString engineURL, in long dataType, in AString iconURL,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;                            in boolean confirm);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Create an attribute named &lt;span style="font-style: italic;"&gt;dynamicEngine&lt;/span&gt; of the type &lt;span style="font-weight: bold;"&gt;nsISearchEngine&lt;/span&gt; to hold the value of a dynamically added search engine that can be set to &lt;span style="font-weight: bold;"&gt;null&lt;/span&gt; when the engine is removed.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;/** The dynamically added search engine. Set to null when&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; *  the dynamically added engine is removed.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;attribute nsISearchEngine dynamicEngine;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/components/search/nsSearchService.js"&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;File: nsSearchService.js&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Create a field named &lt;span style="font-style: italic;"&gt;_dynamicEngine&lt;/span&gt; and initialize it to &lt;span style="font-weight: bold;"&gt;null&lt;/span&gt;.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;SearchService.prototype = {&lt;br /&gt;_engines: { },&lt;br /&gt;_sortedEngines: null,&lt;br /&gt;// Whether or not we need to write the order of engines on shutdown. This&lt;br /&gt;// needs to happen anytime _sortedEngines is modified after initial startup.&lt;br /&gt;_needToSetOrderPrefs: false,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;// The dynamically added engine.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  _dynamicEngine: null,&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/components/search/nsSearchService.js#2726"&gt;&lt;span style="font-weight: bold;"&gt;addEngine() function: &lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Return an &lt;span style="font-weight: bold;"&gt;nsISearchEngine&lt;/span&gt; object.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  return engine;&lt;/span&gt;&lt;br /&gt;},&lt;br /&gt;&lt;/pre&gt;&lt;a style="font-weight: bold;" href="http://lxr.mozilla.org/seamonkey/source/browser/components/search/nsSearchService.js#2741"&gt;removeEngine() function:&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Set the &lt;span style="font-style: italic;"&gt;_dynamicEngine&lt;/span&gt; field's value to &lt;span style="font-weight: bold;"&gt;null&lt;/span&gt; when an engine is removed.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;this._dynamicEngine = null;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Get and set the value of the &lt;span style="font-style: italic;"&gt;dynamicEngine&lt;/span&gt; attribute's value.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;// Get the dynamically added engine.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;get dynamicEngine() {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  return this._dynamicEngine;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;},&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;// Set the dynamically added engine.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;set dynamicEngine(val) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  ENSURE_ARG(val instanceof Ci.nsISearchEngine,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;             "Invalid argument passed to dynamicEngine setter");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  this._dynamicEngine = val;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;},&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box:_Release_v.03.2"&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;/span&gt;&lt;/a&gt;&lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/components/search/content/search.xml"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;File: search.xml&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Create the &lt;span style="font-weight: bold;"&gt;dynamicEngine&lt;/span&gt; property to get the dynamic engine's value from the search service.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&amp;lt;!-- Returns the dynamicEngine from the search service. --&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&amp;lt;property name="dynamicEngine" readonly="true"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; &amp;lt;getter&amp;gt;&amp;lt;![CDATA[&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   var dynamicEngine = this.searchService.dynamicEngine;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   return dynamicEngine;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; ]]&gt;&amp;lt;/getter&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/components/search/content/search.xml#332"&gt;&lt;span style="font-weight: bold;"&gt;rebuildPopupDynamic() method: &lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;When navigating to a site with an OpenSearch plugin and the user clicks the searchbar's button to display the engine list, remove the dynamically added search engine if it is on the list so that it will display as a searchbar "Add &amp;lt;Search Engine&amp;gt;" menu item. Use the search service &lt;a style="font-weight: bold;" href="http://lxr.mozilla.org/seamonkey/source/browser/components/search/nsSearchService.js#2741"&gt;removeEngine() function&lt;/a&gt; to remove the dynamically added search engine if it has a non-null value.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;// Remove the dynamically added search engine if it is on the list when&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;// the popup's menu items are first displayed. The user may then choose&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;// to add the "Add &lt;/span&gt;&lt;search&gt;&lt;span style="font-weight: bold;"&gt;" item to the list of installed engines.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  if (this.dynamicEngine)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    this.searchService.removeEngine(this.dynamicEngine);&lt;/span&gt;&lt;br /&gt;&lt;/search&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5140727620705143469-2878372981854948586?l=kmsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmsingh.blogspot.com/feeds/2878372981854948586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5140727620705143469&amp;postID=2878372981854948586' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/2878372981854948586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/2878372981854948586'/><link rel='alternate' type='text/html' href='http://kmsingh.blogspot.com/2008/02/mozilla-project-update-release-v03.html' title='Mozilla Project Update: Release v.03'/><author><name>Kerry</name><uri>http://www.blogger.com/profile/00365498341161954298</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/_wD0Sz7ZZ0kg/R8d6uI09P7I/AAAAAAAAACM/KtNh7RKc8QY/s72-c/releasev03_ss01.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5140727620705143469.post-4442096165533932386</id><published>2008-02-13T17:20:00.000-08:00</published><updated>2008-02-15T11:21:33.868-08:00</updated><title type='text'>Mozilla Project Update: Request for Project Contributions</title><content type='html'>&lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box#Project_Contributions"&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Mozilla Project: Localized Search in Firefox Search Box - How to Contribute&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I require individuals to add links to to my &lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box"&gt;&lt;span style="font-weight: bold;"&gt;project's wiki page&lt;/span&gt;&lt;/a&gt; for web sites with &lt;a href="http://developer.mozilla.org/en/docs/Creating_OpenSearch_plugins_for_Firefox#OpenSearch"&gt;OpenSearch&lt;/a&gt; plugins that can be "Added" to Firefox's searcbar list of search engines. Web sites with OpenSearch plugins cause Firefox's searchbar drop-down list button to turn &lt;span style="font-weight: bold;"&gt;blue&lt;/span&gt; in color when the browser "auto-discovers" a site with this type of search engine plugin. See the &lt;a style="font-weight: bold;" href="http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box#Web_Site_List"&gt;web site list&lt;/a&gt; on my project's wiki page for examples of these types of sites.&lt;br /&gt;&lt;br /&gt;A web site that supports auto-discovery of a search plugin has a &amp;lt;link&amp;gt; tag in the &amp;lt;head&amp;gt; section of the web page that uses the following format:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;&amp;lt;link rel="search" type="application/opensearchdescription+xml" title="searchTitle" href="pluginURL"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Thanks for your contribution to my project!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5140727620705143469-4442096165533932386?l=kmsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmsingh.blogspot.com/feeds/4442096165533932386/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5140727620705143469&amp;postID=4442096165533932386' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/4442096165533932386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/4442096165533932386'/><link rel='alternate' type='text/html' href='http://kmsingh.blogspot.com/2008/02/mozilla-project-update-request-for.html' title='Mozilla Project Update: Request for Project Contributions'/><author><name>Kerry</name><uri>http://www.blogger.com/profile/00365498341161954298</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-5140727620705143469.post-2951638961179951000</id><published>2008-02-11T12:45:00.000-08:00</published><updated>2008-02-11T17:41:12.007-08:00</updated><title type='text'>Mozilla Project Update: Release v.02</title><content type='html'>&lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box#Release_v.02"&gt;&lt;span style="font-size:130%;"&gt;Mozilla Project: Localized Search in Firefox Search Box - Release v.02&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My objectives for this release were to dynamically "Add" a search engine plugin when Firefox 3 (i.e. Minefield) loads a web page with a search plugin, and then propagate the search engine to the top of the searchbar's menu as the current engine. The propagation of a newly added search engine as the current engine in the searchbar's menu was already a behavioral feature of Firefox 3 so there were no changes required for this part of my release target. Determining how to dynamically "Add" an available search engine plugin was challenging to achieve, but in the end, it only required a few minor modifications to the code in the &lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.js"&gt;browser.js file&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Source Code Description and Modification&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As I mentioned in my previous &lt;a href="http://kmsingh.blogspot.com/2008/02/mozilla-project-update-release-v01.html"&gt;discussion of the source code for searchbar events&lt;/a&gt;, when Firefox 3 loads a web page containing a &amp;lt;link&amp;gt; element, a "DOMLinkAdded" event fires.  The browser has an &lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.js#883"&gt;event listener&lt;/a&gt; for "DOMLinkAdded" events and it employs an event handler named &lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.js#2661"&gt;DOMLinkHandler&lt;/a&gt;. This event handler calls its &lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.js#2669"&gt;onLinkAdded() function&lt;/a&gt;, which creates a generic &lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.js#2758"&gt;engine object&lt;/a&gt; if the page's &amp;lt;link&amp;gt; element's attributes have valid values. Subsequently, the &lt;span style="font-style: italic;"&gt;engine&lt;/span&gt; object is passed to the &lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.js#2769"&gt;BrowserSearch&lt;/a&gt; object's &lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.js#2770"&gt;addEngine() function&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;During the normal flow of code execution, the addEngine() function receives a reference to an &lt;span style="font-style: italic;"&gt;engine&lt;/span&gt; object as one of its parameters.  The function uses &lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.js#2784"&gt;searchService&lt;/a&gt;, an nsIBrowserSearchService object, to determine if the search engine is already on the list of engines. If an nsISearchEngine object with a &lt;span style="font-style: italic;"&gt;name&lt;/span&gt; value matching the generic &lt;span style="font-style: italic;"&gt;engine&lt;/span&gt; object's &lt;span style="font-style: italic;"&gt;title&lt;/span&gt; property is already on the list, then it is considered to be a "hidden" engine and it is "pushed" onto the &lt;span style="font-style: italic;"&gt;browser.hiddenEngines&lt;/span&gt; array. This array is used by the &lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/components/search/content/search.xml"&gt;search.xml file&lt;/a&gt; to determine how to populate and display the search engines on the searchbar menu. If the search engine is not on the list, it gets pushed onto the "non-hidden", &lt;span style="font-style: italic;"&gt;browser.engines&lt;/span&gt; array. In this case, the search engine would then be displayed as an "Add &amp;lt;Search Engine&amp;gt;" item on the searchbar menu and the searchbar button's background color would be changed to blue after a call to the &lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.js#2809"&gt;updateSearchButton() function&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;My code modifications change the BrowserSearch addEngine() function by adding the new search plugin if it is NOT found on the existing list of engines. I dynamically "Add" the search plugin by calling the &lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/components/search/nsSearchService.js#2726"&gt;addEngine() function&lt;/a&gt; defined in the &lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/components/search/nsSearchService.js"&gt;nsSearchService.js file&lt;/a&gt;. This function accomplishes the important step of creating a &lt;span style="font-weight: bold;"&gt;new&lt;/span&gt; nsISearchEngine object. It is this type of object that is required by methods in search.xml, such as &lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/components/search/content/search.xml#208"&gt;observe()&lt;/a&gt;, &lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/components/search/content/search.xml#262"&gt;offerNewEngine()&lt;/a&gt; and &lt;a href="http://lxr.mozilla.org/seamonkey/source/browser/components/search/content/search.xml#290"&gt;hideNewEngine()&lt;/a&gt;. The remainder of the code in the BrowserSearch addEngine() function follows the normal paths of execution.&lt;br /&gt;&lt;br /&gt;My additions to the code in the browser.js file are denoted with plus signs in the patch file shown below:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;? localsearchpatch_v02.txt&lt;br /&gt;? nohup.out&lt;br /&gt;? objdir-ff-debug&lt;br /&gt;Index: browser/base/content/browser.js&lt;br /&gt;===================================================================&lt;br /&gt;RCS file: /cvsroot/mozilla/browser/base/content/browser.js,v&lt;br /&gt;retrieving revision 1.961&lt;br /&gt;diff -u -8 -p -r1.961 browser.js&lt;br /&gt;--- browser/base/content/browser.js 10 Feb 2008 06:57:05 -0000 1.961&lt;br /&gt;+++ browser/base/content/browser.js 11 Feb 2008 19:57:26 -0000&lt;br /&gt;@@ -2780,16 +2780,19 @@ const BrowserSearch = {&lt;br /&gt;// If this engine (identified by title) is already in the list, add it&lt;br /&gt;// to the list of hidden engines rather than to the main list.&lt;br /&gt;// XXX This will need to be changed when engines are identified by URL;&lt;br /&gt;// see bug 335102.&lt;br /&gt;var searchService = Cc["@mozilla.org/browser/search-service;1"].&lt;br /&gt;             getService(Ci.nsIBrowserSearchService);&lt;br /&gt;if (searchService.getEngineByName(engine.title))&lt;br /&gt;hidden = true;&lt;br /&gt;+    else&lt;br /&gt;+      // Dynamically "Add" the web site's search engine plugin.&lt;br /&gt;+      &lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;searchService.addEngine(engine.href, Components.interfaces.nsISearchEngine.DATA_XML, iconURL, false);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;var engines = (hidden ? browser.hiddenEngines : browser.engines) || [];&lt;br /&gt;&lt;br /&gt;engines.push({ uri: engine.href,&lt;br /&gt;        title: engine.title,&lt;br /&gt;        icon: iconURL });&lt;br /&gt;&lt;br /&gt;if (hidden)&lt;br /&gt;&lt;/pre&gt;See my project wiki page for information about &lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box#How_to_Use_the_Patch"&gt;how to apply and use this patch file&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Difficulties and Lessons Learned&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Although the solution was straightforward for what I was essentially attempting to achieve with this release, I had some difficulties understanding how to arrive at it.  From the outset, I understood that I would likely need to make changes to BrowserSearch's addEngine() function. My first thoughts were to pass the generic engine object to the searchbar's hideNewEngine() or observe() functions as shown in the following code examples:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Example 1&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;if (hidden)&lt;br /&gt;browser.hiddenEngines = engines;&lt;br /&gt;else {&lt;br /&gt;browser.engines = engines;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;this.searchBar.hideNewEngine(engine);&lt;/span&gt;&lt;br /&gt;if (browser == gBrowser || browser == gBrowser.mCurrentBrowser)&lt;br /&gt;this.updateSearchButton();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Example 2&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;if (hidden)&lt;br /&gt;browser.hiddenEngines = engines;&lt;br /&gt;else {&lt;br /&gt;browser.engines = engines;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;this.searchBar.observe(engine, "browser-search-engine-modified", "engine-added");&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;if (browser == gBrowser || browser == gBrowser.mCurrentBrowser)&lt;br /&gt;this.updateSearchButton();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;The results of these code modifications were that the search plugins were not dynamically added and they remained as "Add &amp;lt;Search Engine&amp;gt;" items on the searchbar menu. The following JavaScript error message was produced from the above code changes:&lt;br /&gt;&lt;br /&gt;************************************************************&lt;br /&gt;* Call to xpconnect wrapped JSObject produced this error:  *&lt;br /&gt;[Exception... "'[JavaScript Error: "aEngine.wrappedJSObject is undefined" {file: "chrome://browser/content/search/search.xml" line: 256}]' when calling method: [nsIDOMEventListener::handleEvent]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "&amp;lt;unknown&amp;gt;"  data: yes]&lt;br /&gt;************************************************************&lt;br /&gt;&lt;br /&gt;I later learned from Gavin on the #seneca irc channel that I was attempting to pass generic &lt;span style="font-style: italic;"&gt;engine&lt;/span&gt; objects to the functions in search.xml. However, these functions work with &lt;span style="font-weight: bold;"&gt;nsISearchEngine&lt;/span&gt; objects and it was ineffective to use a &lt;span style="font-style: italic;"&gt;searchBar&lt;/span&gt; object (i.e. this.searchBar) to pass them to the functions in search.xml. I needed to use an &lt;span style="font-weight: bold;"&gt;nsIBrowserSearchService&lt;/span&gt; object to "Add" the search engine to the search service's list because the search service only deals with &lt;span style="font-weight: bold;"&gt;nsISearchEngine&lt;/span&gt; objects.&lt;br /&gt;&lt;br /&gt;I also made unsuccessful attempts to dynamically load the search plugin by simply adding the generic &lt;span style="font-style: italic;"&gt;engine&lt;/span&gt; object to the &lt;span style="font-style: italic;"&gt;browser.hiddenEngines&lt;/span&gt; array in BrowserSearch's addEngine() function and by removing any code that would add it to the &lt;span style="font-style: italic;"&gt;browser.engines&lt;/span&gt; array. However, these code changes and similar other ones did not produce the desired results for this release.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5140727620705143469-2951638961179951000?l=kmsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmsingh.blogspot.com/feeds/2951638961179951000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5140727620705143469&amp;postID=2951638961179951000' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/2951638961179951000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/2951638961179951000'/><link rel='alternate' type='text/html' href='http://kmsingh.blogspot.com/2008/02/mozilla-project-update-release-v02.html' title='Mozilla Project Update: Release v.02'/><author><name>Kerry</name><uri>http://www.blogger.com/profile/00365498341161954298</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-5140727620705143469.post-6484996707857536038</id><published>2008-02-02T08:52:00.000-08:00</published><updated>2008-02-04T16:51:45.475-08:00</updated><title type='text'>Mozilla Project Update: Release v.01</title><content type='html'>&lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box#Release_v.01"&gt;&lt;span style="font-size:130%;"&gt;Mozilla Project: Localized Search in Firefox Search Box - Release v.01&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;My main objective for this initial release is to demonstrate a basic understanding of how some of the search box (searchbar) features currently work in the Firefox browser by examining the source code. I attempt to achieve this by placing JavaScript dump() statements within the existing code. These statements output diagnostic messages to the terminal window when running a DEBUG build of Firefox 3 (i.e. Minefield). The messages contain information about what methods or functions are being called and a brief explanation about what is happening in the source code when certain searchbar events occur. These events are listed here and the more pertinent ones to my project are discussed below:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The browser auto-detects a site that has a search plugin available.&lt;/li&gt;&lt;li&gt;The user selects the button to display the search engine list when a search plugin is available.&lt;/li&gt;&lt;li&gt;The user selects the option to "Add &amp;lt;EngineName&amp;gt;".&lt;/li&gt;&lt;li&gt;The user changes the current search engine by selecting it from the search bar drop-down list (menu).&lt;/li&gt;&lt;li&gt;The user moves the position of a search engine using the Search Engine Manager.&lt;/li&gt;&lt;li&gt;The user removes an auto-detected search engine from the list of "installed" search engines with the Search Manager.&lt;/li&gt;&lt;/ul&gt;I created a patch that inserts the dump() statements in the code. You may preview the patch at the following location: &lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box:_Release_v.01"&gt;Patch File: localsearchpatch_v01.txt&lt;/a&gt; . You can also get information about how to download and apply the patch on my &lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box"&gt;project wiki page&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Discussion of Source Code for SearchBar Events:&lt;/span&gt;&lt;br /&gt;When the browser detects that a web site has a search engine plugin, there are a few things that happen in the &lt;a href="http://mxr.mozilla.org/firefox/source/browser/base/content/browser.js"&gt;browser.js&lt;/a&gt; code. The browser has an event listener named "&lt;a href="http://mxr.mozilla.org/firefox/source/browser/base/content/browser.js#884"&gt;DOMLinkAdded&lt;/a&gt;" that employs an event handler named &lt;a href="http://mxr.mozilla.org/firefox/source/browser/base/content/browser.js#2661"&gt;DOMLinkHandler&lt;/a&gt;. My understanding of the code is that when Firefox loads a page containing a &amp;lt;link&amp;gt; element, it triggers a DOMLinkAdded type of event. The DOMLinkHandler  calls its function, &lt;a href="http://mxr.mozilla.org/firefox/source/browser/base/content/browser.js#2669"&gt;onLinkAdded(event)&lt;/a&gt;,  which determines the &lt;span style="font-style: italic;"&gt;rel&lt;/span&gt; attribute value of the &amp;lt;link&amp;gt; element. If it has a value of &lt;span style="font-style: italic;"&gt;search&lt;/span&gt; and its &lt;span style="font-style: italic;"&gt;type&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;title&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;href&lt;/span&gt; attributes have valid values, an &lt;span style="font-style: italic;"&gt;engine&lt;/span&gt; object is created and passed to the BrowserSearch object's &lt;a href="http://mxr.mozilla.org/firefox/source/browser/base/content/browser.js#2770"&gt;addEngine(engine, targetDoc)&lt;/a&gt; function. This function first checks if the &lt;span style="font-style: italic;"&gt;engine&lt;/span&gt; object is already in the browser's array of "hidden" engines, and if it is, then it's &lt;span style="font-style: italic;"&gt;pushed&lt;/span&gt; to the end of the browser's &lt;span style="font-style: italic;"&gt;hiddenEngines&lt;/span&gt; array. If the &lt;span style="font-style: italic;"&gt;engine&lt;/span&gt; object is not in the &lt;span style="font-style: italic;"&gt;hiddenEngines&lt;/span&gt; array, then it is added to the browser's &lt;span style="font-style: italic;"&gt;engines&lt;/span&gt; array.&lt;br /&gt;&lt;br /&gt;When a web page has a search plugin and the user clicks the button to display the searchbar menu, an event handler named "popupshowing" calls the &lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/content/search.xml#361"&gt;rebuildPopupDynamic()&lt;/a&gt; method in &lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/content/search.xml"&gt;search.xml&lt;/a&gt;. If the main popup menu items have not been added yet, rebuildPopupDynamic() calls the &lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/content/search.xml#423"&gt;rebuildPopup()&lt;/a&gt; method, which rebuilds the list of visible search engines in the menu. Next, the rebuildPopupDynamic() method clears any existing "Add &amp;lt;EngineName&amp;gt;" menu items from the popup menu and assigns the browser's &lt;span style="font-style: italic;"&gt;engines&lt;/span&gt; array to the &lt;span style="font-style: italic;"&gt;addengines&lt;/span&gt; array.  Then, it inserts the elements of the &lt;span style="font-style: italic;"&gt;addengines&lt;/span&gt; array as menu items onto the searchbar menu as "Add &amp;lt;EngineName&amp;gt;" menu items.&lt;br /&gt;&lt;br /&gt;Selecting the "Add &amp;lt;EngineName&amp;gt;" menu notifies the searchbar's &lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/content/search.xml#232"&gt;observe(aEngine, aTopic, aVerb)&lt;/a&gt; method and it calls the &lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/content/search.xml#232"&gt;hideNewEngine(aEngine)&lt;/a&gt; method, passing it a reference to the search engine object. The hideNewEngine(aEngine) method moves the engine object to each browser's "hidden" array so it is no longer offered to be added if the engine was auto-detected on the web page. This method iterates through all of the browser's open tabs and finds the selected engine in the browser's &lt;span style="font-style: italic;"&gt;engines&lt;/span&gt; array. Then, it adds the search engine to the browser's &lt;span style="font-style: italic;"&gt;hiddenEngines&lt;/span&gt; array  and removes it from the browser's &lt;span style="font-style: italic;"&gt;engines&lt;/span&gt; array. As a further explanation, browser.js fills two arrays of auto-detected search engines (browser.engines and browser.hiddenEngines). Those arrays contain unnamed JS objects that the searchbar uses to determine  whether to show any "Add &amp;lt;EngineName&amp;gt;" menu items in the drop-down list.&lt;br /&gt;&lt;br /&gt;When the user opens the Search Engine Manager Dialog Box, selects an auto-detected search engine from the "installed" list of engines and clicks the "Remove" button, the dialog's &lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/content/engineManager.js#126"&gt;remove()&lt;/a&gt; function gets called in the &lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/content/engineManager.js"&gt;engineManager.js&lt;/a&gt; file. The remove() function then passes a reference of the selected engine to an EngineView object's &lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/content/engineManager.js#403"&gt;removeEngine(aEngine)&lt;/a&gt; function. This function removes the selected engine from the array of "Visible" engines using the index of the selected engine. It also adds an &lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/content/engineManager.js#409"&gt;EngineRemoveOp&lt;/a&gt; object to an array. It is this object's &lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/content/engineManager.js#277"&gt;commit()&lt;/a&gt; function that gets called when the user clicks the "OK" button in the Search Engine Manager Dialog. The commit() function uses an object reference to  call  the  &lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/nsSearchService.js#2741"&gt;removeEngine(aEngine)&lt;/a&gt;  function defined  in &lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/nsSearchService.js"&gt;nsSearchService.js&lt;/a&gt; .   This function completes the search engine removal process by removing the engine from its internal store and then removes it from disk if the file can be removed.&lt;br /&gt;&lt;br /&gt;Removing an auto-detected search engine also notifies search.xml's &lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/content/search.xml#232"&gt;observe(aEngine, aTopic, aVerb)&lt;/a&gt; method, which calls the &lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/content/search.xml#232"&gt;offerNewEngine(aEngine)&lt;/a&gt; method, passing it a reference to the search engine object. This method moves the search engine to each browser's active list so that it will be available to be added again if the engine that was just removed from the searchbar menu was auto-detected on the web page. Similar to the hideNewEngine(aEngine) method,  offerNewEngine(aEngine) iterates through all of the browser's open tabs and finds the engine in the browser's &lt;span style="font-style: italic;"&gt;hiddenEngines&lt;/span&gt; array. Then, it adds the search engine to the browser's &lt;span style="font-style: italic;"&gt;engines&lt;/span&gt; array  and removes it from the browser's &lt;span style="font-style: italic;"&gt;hiddenEngines&lt;/span&gt; array.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Files:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://mxr.mozilla.org/firefox/source/browser/base/content/browser.js"&gt;browser.js&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/content/engineManager.js"&gt;engineManager.js&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/nsIBrowserSearchService.idl"&gt;nsIBrowserSearchService.idl&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/nsSearchService.js"&gt;nsSearchService.js&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mxr.mozilla.org/firefox/source/browser/components/search/content/search.xml"&gt;search.xml&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5140727620705143469-6484996707857536038?l=kmsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmsingh.blogspot.com/feeds/6484996707857536038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5140727620705143469&amp;postID=6484996707857536038' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/6484996707857536038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/6484996707857536038'/><link rel='alternate' type='text/html' href='http://kmsingh.blogspot.com/2008/02/mozilla-project-update-release-v01.html' title='Mozilla Project Update: Release v.01'/><author><name>Kerry</name><uri>http://www.blogger.com/profile/00365498341161954298</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-5140727620705143469.post-6189251016158989882</id><published>2008-01-26T09:24:00.000-08:00</published><updated>2008-01-26T09:29:12.399-08:00</updated><title type='text'>Mozilla Project Update: Determining Direction - Part II</title><content type='html'>&lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box"&gt;&lt;span style="font-size:130%;"&gt;Mozilla Project: Localized Search in Firefox's Search Box&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;After giving a few ideas some lengthy consideration, I've decided to take the approach to extend Firefox's search box so that it automatically adds search engine plugins to the search bar's drop-down list and then propagates search plugins to the top of the list when the browser encounters a web site that offers a search engine plugin and an OpenSearch description file. I've decided on this approach because the scope of the project appears to fit with the time constraints with which I'm working, it challenges my knowledge and abilities, and much of the code exists for what I'm attempting to achieve with this project.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5140727620705143469-6189251016158989882?l=kmsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmsingh.blogspot.com/feeds/6189251016158989882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5140727620705143469&amp;postID=6189251016158989882' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/6189251016158989882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/6189251016158989882'/><link rel='alternate' type='text/html' href='http://kmsingh.blogspot.com/2008/01/mozilla-project-update-determining_26.html' title='Mozilla Project Update: Determining Direction - Part II'/><author><name>Kerry</name><uri>http://www.blogger.com/profile/00365498341161954298</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-5140727620705143469.post-680280462686311442</id><published>2008-01-23T18:30:00.000-08:00</published><updated>2008-01-26T09:27:24.298-08:00</updated><title type='text'>Mozilla Project Update: Determining Direction - Part I</title><content type='html'>&lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box"&gt;&lt;span style="font-size:130%;"&gt;Mozilla Project: Localized Search in Firefox's Search Box&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;After doing some initial research, I was uncertain about what direction to take with my project for enhancing, or extending Firefox's existing search box. To help me determine a direction for my project, I searched &lt;a href="https://bugzilla.mozilla.org/"&gt;Bugzilla@Mozilla&lt;/a&gt; where I found a number of bugs that were related to my project. I've added some of the more relevant bugs to my &lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box#Project-Related_Bugs"&gt;project's wiki page&lt;/a&gt;. I also spoke with Chris Tyler, Dave Humphrey and consulted with Gavin Sharp through e-mail and on &lt;a href="http://en.wikipedia.org/wiki/IRC"&gt;IRC &lt;/a&gt;to get some ideas for my project's direction and to determine the scope of my project. From these discussions and communication exchanges, a few ideas emerged.&lt;br /&gt;One idea that emerged was to extend Firefox's search box so that it automatically adds a search engine plugin to the search bar's drop-down list and then propagates the search plugin to the top of the list when the browser encounters a web site that offers a  search engine plugin and an OpenSearch description file. From reading some of the bugs at Bugzilla@Mozilla and from personal experience, it appears that most users have a preferred search engine to use as their default search engine so it would be necessary to a) reset the original default search engine on the drop-down list and b) give the user the option to retain the newly added search if it was not originally on the drop-down list. Some further investigation is required to determine if it would be possible to toggle between different search engines on the list if the user has two or more tabs open for different web sites that offer different search engine plugins.&lt;br /&gt;A second idea that came from Gavin was to prototype the feature described in &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=335448"&gt;Bug 335448 - Autodetect repeated use of a search field, and ask the user if they want that engine added to the browser search box&lt;/a&gt;. This enhancement bug proposes that when Firefox detects that a user has used a particular web site's search box &lt;span style="font-style: italic;"&gt;n&lt;/span&gt; number of times, the user should be presented with the option to add the web site's search feature to the browser's search bar drop-down list and auto-generate a search engine plugin based on the web page's form elements. Gavin suggested that this would mostly involve implementing an &lt;a href="http://wiki.mozilla.org/Search_Service:Code_Design#Automatic_Detection"&gt;Automatic Detection&lt;/a&gt; algorithm and combining it with the search engine addition code from the non-landed patch in &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=261124"&gt;Bug 261124 - Textbox context menu should have "Add to Search Bar..."&lt;/a&gt; The patch adds search engines to Firefox's search bar given an input field and its associated form element. Potential drawbacks to this enhancement are being able to accurately and consistently auto-generate a search plugin based on a web page's form elements if the names or id's of the elements change, and being able to maintain an accurate account of search box usage if the user clears  the browser's private data or the user does not accept cookies from sites.&lt;br /&gt;The third idea was to have the browser detect web site search elements based on names, id's and class names that are commonly used for search input elements, and then use this metadata to generate and add search engine plugins to Firefox's search bar. This approach is very dynamic and fluid but it presents the major problem of being able to accurately and consistently detect search fields based on this type of widely diverse and random metadata.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5140727620705143469-680280462686311442?l=kmsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmsingh.blogspot.com/feeds/680280462686311442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5140727620705143469&amp;postID=680280462686311442' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/680280462686311442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/680280462686311442'/><link rel='alternate' type='text/html' href='http://kmsingh.blogspot.com/2008/01/mozilla-project-update-determining.html' title='Mozilla Project Update: Determining Direction - Part I'/><author><name>Kerry</name><uri>http://www.blogger.com/profile/00365498341161954298</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-5140727620705143469.post-6846907741083982590</id><published>2008-01-23T16:14:00.000-08:00</published><updated>2008-01-23T18:29:34.170-08:00</updated><title type='text'>Mozilla Project Update: Initial  Research</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box"&gt;Mozilla Project: Localized Search in Firefox's Search Box&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;During the initial research for my project, I discovered that Firefox 2.0 detects search engine plugins that may be manually added by the user to Firefox's search engine drop-down list. The user may then decide to select a particular search engine as the default for the browser's built-in search box. When Firefox detects a search plugin that has not yet been "Added" to the browser's list of search engines, the search engine icon and the drop-down list arrow of the browser's search box turn blue in colour.&lt;br /&gt;Firefox allows JavaScript code to install search engine plugins, and supports two search engine plugin formats: &lt;a href="http://developer.mozilla.org/en/docs/Creating_OpenSearch_plugins_for_Firefox"&gt;OpenSearch&lt;/a&gt; and &lt;a href="http://mycroft.mozdev.org/deepdocs/quickstart.html"&gt;Sherlock&lt;/a&gt;. Firefox supports &lt;a href="http://developer.mozilla.org/en/docs/Creating_OpenSearch_plugins_for_Firefox#Autodiscovery_of_search_plugins"&gt;autodiscovery of search plugins&lt;/a&gt; , which enables a web site that offers a search plugin to advertise it, so that Firefox users can easily download and install the plugin. Any web site offering a search plugin must provide an &lt;a href="http://developer.mozilla.org/en/docs/Creating_OpenSearch_plugins_for_Firefox#OpenSearch_description_file"&gt;OpenSearch description file&lt;/a&gt;,  which is an  XML file describing the search engine to the browser. To support autodiscovery of a search plugin, HTML code similar to the following line needs to be added to the &lt;code&gt;&lt;/code&gt;&amp;lt;head&amp;gt; section of the web page:&lt;br /&gt;&lt;br /&gt;&amp;lt;link rel="search" type="application/opensearchdescription+xml" title="searchTitle" href="pluginURL"&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5140727620705143469-6846907741083982590?l=kmsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmsingh.blogspot.com/feeds/6846907741083982590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5140727620705143469&amp;postID=6846907741083982590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/6846907741083982590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/6846907741083982590'/><link rel='alternate' type='text/html' href='http://kmsingh.blogspot.com/2008/01/mozilla-project-update-initial-research.html' title='Mozilla Project Update: Initial  Research'/><author><name>Kerry</name><uri>http://www.blogger.com/profile/00365498341161954298</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-5140727620705143469.post-1672892631592768047</id><published>2008-01-07T11:36:00.001-08:00</published><updated>2008-01-23T16:07:52.614-08:00</updated><title type='text'>Week 5: Watching a User in Bugzilla</title><content type='html'>Starting from December 11, 2007 to December 18, 2007, I set my &lt;a href="https://bugzilla.mozilla.org/"&gt;Bugzilla@Mozilla&lt;/a&gt; account to watch Myk Melez, a &lt;a href="http://www.mozilla.org/about/staff"&gt;mozilla.org&lt;/a&gt; staff member. It appears that Myk is mainly involved with the following &lt;a href="http://www.mozilla.org/products/"&gt;Mozilla Products&lt;/a&gt;: &lt;a href="http://developer.mozilla.org/en/docs/Toolkit_API"&gt;Toolkit&lt;/a&gt;, &lt;a href="http://www.mozilla.org/projects/firefox/"&gt;Firefox&lt;/a&gt;, &lt;a href="https://bugzilla.mozilla.org/"&gt;Bugzilla&lt;/a&gt;,  &lt;a href="https://addons.mozilla.org/en-US/firefox/"&gt;addons.mozilla.org&lt;/a&gt;, and Core. Although Myk was only assigned to six out of the 45 bugs that I observed, he was heavily involved with several bugs for many different Mozilla product components as summarized below.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Toolkit:&lt;/span&gt;  XUL Widgets, Storage&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Firefox: &lt;/span&gt; Bookmarks, Preferences, General, File Handling, Places, Location Bar and Autocomplete, Phishing Protection, Password Manager,  OS Integration, Session Restore,  RSS Discovery and Preview, Page Info, Microsummaries&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Bugzilla:&lt;/span&gt;  User Interface, Administration, Query/Bug List&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Core:&lt;/span&gt;  Embedding: Docshell, SVG, Editor, GFX, Layout, Build Config, Plug-ins, Widget: Gtk, Networking: Cookies&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;addons.mozilla.org: &lt;/span&gt; Developer Pages&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Based on my observations during the time period mentioned above, I noted that Myk was assigned to the following bugs:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=406697"&gt;Bug 406697&lt;/a&gt; – Can't load the correct bookmark in sidebar after opened another page in it.&lt;br /&gt;&lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=407910"&gt;Bug 407910&lt;/a&gt; – clear site-specific preferences when clearing browser history&lt;br /&gt;&lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=395638"&gt;Bug 395638&lt;/a&gt; – don't provide sorting options in Applications prefpane&lt;br /&gt;&lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=395637"&gt;Bug 395637&lt;/a&gt; – sort alphabetically, but with common types on top, in Applications prefpane&lt;br /&gt;&lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=408389"&gt;Bug 408389&lt;/a&gt; – Live Titles don't have selection&lt;br /&gt;&lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=403565"&gt;Bug 403565&lt;/a&gt; – Old page gets resized when browsing to a new one&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5140727620705143469-1672892631592768047?l=kmsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmsingh.blogspot.com/feeds/1672892631592768047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5140727620705143469&amp;postID=1672892631592768047' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/1672892631592768047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/1672892631592768047'/><link rel='alternate' type='text/html' href='http://kmsingh.blogspot.com/2008/01/week-5-watching-user-in-bugzilla.html' title='Week 5: Watching a User in Bugzilla'/><author><name>Kerry</name><uri>http://www.blogger.com/profile/00365498341161954298</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-5140727620705143469.post-4656505599224589082</id><published>2007-11-24T13:32:00.000-08:00</published><updated>2007-11-26T16:58:33.717-08:00</updated><title type='text'>Week 4: Source Code Reading Lab</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Bookmarks &gt; Bookmark This Page...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;u&gt;Search Using LXR:&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;I selected the "Bookmarks &gt; Bookmark This Page..." top-level browser action to search and trace through the code to better understand where the code is located and how it works. I started with a text search at &lt;a href="http://lxr.mozilla.org/mozilla/"&gt;http://lxr.mozilla.org/mozilla/&lt;/a&gt; . My search produced the following resuls:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lxr.mozilla.org/mozilla/source/browser/locales/en-US/chrome/browser/browser.dtd#58"&gt;/browser/locales/en-US/chrome/browser/browser.dtd, line 58&lt;/a&gt;&lt;br /&gt;&amp;lt;!ENTITY addCurPageAsCmd.label "Bookmark This Page..."&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lxr.mozilla.org/mozilla/source/browser/locales/en-US/chrome/browser/browser.dtd#234"&gt;/browser/locales/en-US/chrome/browser/browser.dtd, line 234&lt;/a&gt;&lt;br /&gt;&amp;lt;!ENTITY bookmarkPageCmd.label "Bookmark This Page..."&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lxr.mozilla.org/mozilla/source/browser/locales/en-US/chrome/help/menu_reference.xhtml#303"&gt;/browser/locales/en-US/chrome/help/menu_reference.xhtml, line 303&lt;/a&gt;&lt;br /&gt;&amp;lt;h3 id="add_to_bookmarks"&amp;gt;Bookmark This Page...&amp;lt;/h3&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lxr.mozilla.org/mozilla/source/browser/locales/en-US/chrome/help/firebird-toc.rdf#360"&gt;/browser/locales/en-US/chrome/help/firebird-toc.rdf, line 360&lt;/a&gt;&lt;br /&gt;&amp;lt;rdf:li&amp;gt;&amp;lt;rdf:Description ID="menu-bookmarks-add-to-bookmarks" nc:name="Bookmark This Page..." nc:link="menu_reference.xhtml#add_to_bookmarks"/&amp;gt; &amp;lt;/rdf:li&amp;gt;&lt;br /&gt;&lt;br /&gt;The first two results are entity references within the browser.dtd file of the Mozilla browser and appear to be more relevant to the "Bookmark This Page.." functionality of the browser. The third result is an XHTML file containing help information from the browser's help menu. The fourth result appears to be more relevant to Firebird.&lt;br /&gt;&lt;br /&gt;Next, I searched using the term "bookmarkPageCmd.label". One of the results was in the browser directory:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lxr.mozilla.org/mozilla/source/browser/base/content/browser-context.inc#127"&gt;/browser/base/content/browser-context.inc, line 127&lt;/a&gt;&lt;br /&gt;label="&amp;amp;bookmarkPageCmd.label;"&lt;br /&gt;&lt;br /&gt;I found that the oncommand attribute of the &amp;lt;menuitem&amp;gt; called a function named &lt;span style="font-size:100%;"&gt;bookmarkThisPage(), so I did a search of this function. I found a JavaScript file (&lt;/span&gt;&lt;a href="http://lxr.mozilla.org/mozilla/source/browser/base/content/nsContextMenu.js#1142"&gt;/browser/base/content/nsContextMenu.js, line 1142&lt;/a&gt;&lt;span style="font-size:100%;"&gt;) with the following code:&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;pre&gt;bookmarkThisPage: function CM_bookmarkThisPage() {&lt;br /&gt;window.top.PlacesCommandHook.bookmarkPage(this.browser,&lt;br /&gt;PlacesUtils.bookmarksMenuFolderId, true);&lt;span style="font-size:100%;"&gt;&lt;br /&gt;},&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;I saw that this function called another function named bookmarkPage() so I searched for that function and I found a JavaScript file (&lt;a href="http://lxr.mozilla.org/mozilla/source/browser/base/content/browser-places.js#173"&gt;/browser/base/content/browser-places.js, line 173&lt;/a&gt;) with the following function definition:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;/**&lt;br /&gt;* Adds a bookmark to the page loaded in the given browser.&lt;br /&gt;*&lt;br /&gt;* @param aBrowser&lt;br /&gt;*        a &lt;browser&gt; element.&lt;br /&gt;* @param [optional] aParent&lt;br /&gt;*        The folder in which to create a new bookmark if the page loaded in&lt;br /&gt;*        aBrowser isn't bookmarked yet, defaults to the unfiled root.&lt;br /&gt;* @param [optional] aShowEditUI&lt;br /&gt;*        whether or not to show the edit-bookmark UI for the bookmark item&lt;br /&gt;*/&lt;br /&gt;bookmarkPage: function PCH_bookmarkPage(aBrowser, aParent, aShowEditUI) {&lt;br /&gt;var uri = aBrowser.currentURI;&lt;br /&gt;var itemId = PlacesUtils.getMostRecentBookmarkForURI(uri);&lt;br /&gt;if (itemId == -1) {&lt;br /&gt;// Copied over from addBookmarkForBrowser:&lt;br /&gt;// Bug 52536: We obtain the URL and title from the nsIWebNavigation&lt;br /&gt;// associated with a &lt;browser&gt; rather than from a DOMWindow.&lt;br /&gt;// This is because when a full page plugin is loaded, there is&lt;br /&gt;// no DOMWindow (?) but information about the loaded document&lt;br /&gt;// may still be obtained from the webNavigation.&lt;br /&gt;var webNav = aBrowser.webNavigation;&lt;br /&gt;var url = webNav.currentURI;&lt;br /&gt;var title;&lt;br /&gt;var description;&lt;br /&gt;try {&lt;br /&gt;title = webNav.document.title;&lt;br /&gt;description = PlacesUtils.getDescriptionFromDocument(webNav.document);&lt;br /&gt;}&lt;br /&gt;catch (e) { }&lt;br /&gt;&lt;br /&gt;var parent = aParent != undefined ?&lt;br /&gt;      aParent : PlacesUtils.unfiledBookmarksFolderId;&lt;br /&gt;var descAnno = { name: DESCRIPTION_ANNO, value: description };&lt;br /&gt;var txn = PlacesUtils.ptm.createItem(uri, parent, -1,&lt;br /&gt;                              title, null, [descAnno]);&lt;br /&gt;PlacesUtils.ptm.commitTransaction(txn);&lt;br /&gt;if (aShowEditUI)&lt;br /&gt;itemId = PlacesUtils.getMostRecentBookmarkForURI(uri);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if (aShowEditUI) {&lt;br /&gt;// dock the panel to the star icon when possible, otherwise dock&lt;br /&gt;// it to the content area&lt;br /&gt;if (aBrowser.contentWindow == window.content) {&lt;br /&gt;var starIcon = aBrowser.ownerDocument.getElementById("star-button");&lt;br /&gt;if (starIcon &amp;amp;&amp;amp; isElementVisible(starIcon)) {&lt;br /&gt;this.showEditBookmarkPopup(itemId, starIcon, "after_start");&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;this.showEditBookmarkPopup(itemId, aBrowser, "overlap");&lt;br /&gt;}&lt;br /&gt;},&lt;/browser&gt;&lt;/browser&gt;&lt;/pre&gt;&lt;span style="font-family:Georgia,serif;"&gt;&lt;/span&gt;&lt;br /&gt;Note about LXR: It provides an option for regular expression searches.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;u&gt;Search Using MXR:&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;I conducted a similar text search for the text "Bookmark This Page..." using the Firefox branch at MXR (&lt;a href="http://mxr.mozilla.org/firefox/"&gt;http://mxr.mozilla.org/firefox/&lt;/a&gt;). I followed a similar progression during my search through files that were the same as that of my previous search. I found this search mechanism to be more helpful than LXR because it showed a summary of where the bookmarkPage() function is defined and in what files it is referenced:&lt;br /&gt;&lt;br /&gt;Defined as a function in:&lt;ul&gt;&lt;li&gt;&lt;a href="http://mxr.mozilla.org/firefox/source/browser/base/content/browser-places.js#173"&gt;browser/base/content/browser-places.js&lt;/a&gt;, line &lt;a href="http://mxr.mozilla.org/firefox/source/browser/base/content/browser-places.js#173"&gt;173&lt;/a&gt; &lt;span class="bonsailinks"&gt;(View &lt;a href="http://bonsai.mozilla.org/cvslog.cgi?file=/mozilla/browser/base/content/browser-places.js&amp;amp;rev=1.67"&gt;change log&lt;/a&gt; or  &lt;a href="http://bonsai.mozilla.org/cvsblame.cgi?&amp;amp;file=/mozilla/browser/base/content/browser-places.js&amp;amp;mark=173&amp;amp;rev=1.67"&gt;Blame annotations&lt;/a&gt;)&lt;/span&gt;   &lt;!--  &lt;span class="bonsailinks"&gt;(View &lt;a href="http://error.trac-not-found.tld/ /log//browser-places.js"&gt;change log&lt;/a&gt;)&lt;/span&gt;  --&gt;   &lt;/li&gt;&lt;/ul&gt; Referenced (in 3 files total) in: &lt;ul&gt;&lt;li&gt;&lt;a href="http://mxr.mozilla.org/firefox/source/browser/base/content/browser-places.js"&gt;browser/base/content/browser-places.js&lt;/a&gt; &lt;span class="bonsailinks"&gt;(View &lt;a href="http://bonsai.mozilla.org/cvslog.cgi?file=/mozilla/browser/base/content/browser-places.js&amp;amp;rev=1.67"&gt;change log&lt;/a&gt; or  &lt;a href="http://bonsai.mozilla.org/cvsblame.cgi?&amp;amp;file=/mozilla/browser/base/content/browser-places.js&amp;amp;mark=173,221&amp;amp;rev=1.67"&gt;Blame annotations&lt;/a&gt;)&lt;/span&gt;   &lt;!--  &lt;span class="bonsailinks"&gt;(View &lt;a href="http://error.trac-not-found.tld/ /log//browser-places.js"&gt;change log&lt;/a&gt;)&lt;/span&gt;  --&gt;   &lt;ul&gt;&lt;li&gt;&lt;a href="http://mxr.mozilla.org/firefox/source/browser/base/content/browser-places.js#173"&gt;line 173&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://mxr.mozilla.org/firefox/source/browser/base/content/browser-places.js#221"&gt;line 221&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://mxr.mozilla.org/firefox/source/browser/base/content/nsContextMenu.js"&gt;browser/base/content/nsContextMenu.js&lt;/a&gt; &lt;span class="bonsailinks"&gt;(View &lt;a href="http://bonsai.mozilla.org/cvslog.cgi?file=/mozilla/browser/base/content/nsContextMenu.js&amp;amp;rev=1.29"&gt;change log&lt;/a&gt; or  &lt;a href="http://bonsai.mozilla.org/cvsblame.cgi?&amp;amp;file=/mozilla/browser/base/content/nsContextMenu.js&amp;amp;mark=1143&amp;amp;rev=1.29"&gt;Blame annotations&lt;/a&gt;)&lt;/span&gt;   &lt;!--  &lt;span class="bonsailinks"&gt;(View &lt;a href="http://error.trac-not-found.tld/ /log//nsContextMenu.js"&gt;change log&lt;/a&gt;)&lt;/span&gt;  --&gt;   &lt;ul&gt;&lt;li&gt;&lt;a href="http://mxr.mozilla.org/firefox/source/browser/base/content/nsContextMenu.js#1143"&gt;line 1143&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://mxr.mozilla.org/firefox/source/browser/base/content/browser.js"&gt;browser/base/content/browser.js&lt;/a&gt; &lt;span class="bonsailinks"&gt;(View &lt;a href="http://bonsai.mozilla.org/cvslog.cgi?file=/mozilla/browser/base/content/browser.js&amp;amp;rev=1.902"&gt;change log&lt;/a&gt; or  &lt;a href="http://bonsai.mozilla.org/cvsblame.cgi?&amp;amp;file=/mozilla/browser/base/content/browser.js&amp;amp;mark=255&amp;amp;rev=1.902"&gt;Blame annotations&lt;/a&gt;)&lt;/span&gt;   &lt;!--  &lt;span class="bonsailinks"&gt;(View &lt;a href="http://error.trac-not-found.tld/ /log//browser.js"&gt;change log&lt;/a&gt;)&lt;/span&gt;  --&gt;   &lt;ul&gt;&lt;li&gt;&lt;a href="http://mxr.mozilla.org/firefox/source/browser/base/content/browser.js#255"&gt;line 255&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Like LXR, MXR provides an option for regular expression searches and it allows for case sensitive searches. MXR also enables users to limit the search results to certain types of files, specific output patterns and to specify what tree to search.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;u&gt;Search Using MXR-test:&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;This search yielded very similar results as the MXR search. I used the Mozilla starting point (&lt;a href="http://mxr-test.landfill.bugzilla.org/mozilla/"&gt;http://mxr-test.landfill.bugzilla.org/mozilla/&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Defined as a function in:&lt;ul&gt;&lt;li&gt;&lt;a href="http://mxr-test.landfill.bugzilla.org/mozilla/source/browser/base/content/browser-places.js"&gt;browser/base/content/browser-places.js&lt;/a&gt; &lt;span class="bonsailinks"&gt;(View &lt;a href="http://bonsai.mozilla.org/cvslog.cgi?file=/mozilla/browser/base/content/browser-places.js&amp;amp;rev=1.66"&gt;change log&lt;/a&gt; or  &lt;a href="http://bonsai.mozilla.org/cvsblame.cgi?&amp;amp;file=/mozilla/browser/base/content/browser-places.js&amp;amp;mark=173&amp;amp;rev=1.66"&gt;Blame annotations&lt;/a&gt;)&lt;/span&gt;   &lt;!--  &lt;span class="bonsailinks"&gt;(View &lt;a href="http://error.trac-not-found.tld/ /log//browser-places.js"&gt;change log&lt;/a&gt;)&lt;/span&gt;  --&gt;    &lt;ul&gt;&lt;li&gt;&lt;a href="http://mxr-test.landfill.bugzilla.org/mozilla/source/browser/base/content/browser-places.js#173"&gt;line 173&lt;/a&gt;  &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;/ul&gt;Referenced in: &lt;ul&gt;&lt;li&gt;&lt;a href="http://mxr-test.landfill.bugzilla.org/mozilla/source/browser/base/content/browser-places.js"&gt;browser/base/content/browser-places.js&lt;/a&gt; &lt;span class="bonsailinks"&gt;(View &lt;a href="http://bonsai.mozilla.org/cvslog.cgi?file=/mozilla/browser/base/content/browser-places.js&amp;amp;rev=1.66"&gt;change log&lt;/a&gt; or  &lt;a href="http://bonsai.mozilla.org/cvsblame.cgi?&amp;amp;file=/mozilla/browser/base/content/browser-places.js&amp;amp;mark=221&amp;amp;rev=1.66"&gt;Blame annotations&lt;/a&gt;)&lt;/span&gt;   &lt;!--  &lt;span class="bonsailinks"&gt;(View &lt;a href="http://error.trac-not-found.tld/ /log//browser-places.js"&gt;change log&lt;/a&gt;)&lt;/span&gt;  --&gt;    &lt;ul&gt;&lt;li&gt;&lt;a href="http://mxr-test.landfill.bugzilla.org/mozilla/source/browser/base/content/browser-places.js#221"&gt;line 221&lt;/a&gt;  &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://mxr-test.landfill.bugzilla.org/mozilla/source/browser/base/content/browser.js"&gt;browser/base/content/browser.js&lt;/a&gt; &lt;span class="bonsailinks"&gt;(View &lt;a href="http://bonsai.mozilla.org/cvslog.cgi?file=/mozilla/browser/base/content/browser.js&amp;amp;rev=1.900"&gt;change log&lt;/a&gt; or  &lt;a href="http://bonsai.mozilla.org/cvsblame.cgi?&amp;amp;file=/mozilla/browser/base/content/browser.js&amp;amp;mark=255&amp;amp;rev=1.900"&gt;Blame annotations&lt;/a&gt;)&lt;/span&gt;   &lt;!--  &lt;span class="bonsailinks"&gt;(View &lt;a href="http://error.trac-not-found.tld/ /log//browser.js"&gt;change log&lt;/a&gt;)&lt;/span&gt;  --&gt;    &lt;ul&gt;&lt;li&gt;&lt;a href="http://mxr-test.landfill.bugzilla.org/mozilla/source/browser/base/content/browser.js#255"&gt;line 255&lt;/a&gt;  &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://mxr-test.landfill.bugzilla.org/mozilla/source/browser/base/content/nsContextMenu.js"&gt;browser/base/content/nsContextMenu.js&lt;/a&gt; &lt;span class="bonsailinks"&gt;(View &lt;a href="http://bonsai.mozilla.org/cvslog.cgi?file=/mozilla/browser/base/content/nsContextMenu.js&amp;amp;rev=1.29"&gt;change log&lt;/a&gt; or  &lt;a href="http://bonsai.mozilla.org/cvsblame.cgi?&amp;amp;file=/mozilla/browser/base/content/nsContextMenu.js&amp;amp;mark=1143&amp;amp;rev=1.29"&gt;Blame annotations&lt;/a&gt;)&lt;/span&gt;   &lt;!--  &lt;span class="bonsailinks"&gt;(View &lt;a href="http://error.trac-not-found.tld/ /log//nsContextMenu.js"&gt;change log&lt;/a&gt;)&lt;/span&gt;  --&gt;    &lt;ul&gt;&lt;li&gt;&lt;a href="http://mxr-test.landfill.bugzilla.org/mozilla/source/browser/base/content/nsContextMenu.js#1143"&gt;line 1143&lt;/a&gt;  &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;/ul&gt;MXR-test enables users to narrow their search results similarly to MXR but it provides more file-types to select for refining the search and it also allows limiting the number of matches per file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5140727620705143469-4656505599224589082?l=kmsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmsingh.blogspot.com/feeds/4656505599224589082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5140727620705143469&amp;postID=4656505599224589082' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/4656505599224589082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/4656505599224589082'/><link rel='alternate' type='text/html' href='http://kmsingh.blogspot.com/2007/11/week-3-source-code-reading-lab.html' title='Week 4: Source Code Reading Lab'/><author><name>Kerry</name><uri>http://www.blogger.com/profile/00365498341161954298</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-5140727620705143469.post-2855866687880554185</id><published>2007-11-18T18:13:00.000-08:00</published><updated>2007-11-18T19:10:38.478-08:00</updated><title type='text'>FSOSS 2007 Keynote: Applying Open Source Concepts to Non-Software Industries</title><content type='html'>The keynote speaker on Day 1 of FSOSS 2007 was Bob Young, Co-founder of RedHat and Founder/CEO of Lulu.com. The topic intrigued me and I found it interesting to consider how industries outside of software development, to varying degrees, implement concepts that are similar to those of the Open Source Development Model and those of the Proprietary Software Development Model.&lt;br /&gt;&lt;br /&gt;Among various other topics in his talk, Bob Young discussed how some sports, particularly North American football, may be viewed as having been developed using a form of open source model because it was derived conceptually from the British sport of rugby. He also talked about the legal system and the way that lawyers use open source concepts to freely construct arguments based upon the work of other lawyers and legal precedents.&lt;br /&gt;&lt;br /&gt;Bob Young's address to the audience was fairly informal and entertaining. I had the expectation that he would have gone more in-depth into the subject matter and I had hoped to have gained more information and knowledge from his talk. Nonetheless, it gave me a new perspective on non-software industries and how they relate conceptually to the open source - proprietary software development continuum.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5140727620705143469-2855866687880554185?l=kmsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmsingh.blogspot.com/feeds/2855866687880554185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5140727620705143469&amp;postID=2855866687880554185' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/2855866687880554185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/2855866687880554185'/><link rel='alternate' type='text/html' href='http://kmsingh.blogspot.com/2007/11/fsoss-2007-keynote-applying-open-source.html' title='FSOSS 2007 Keynote: Applying Open Source Concepts to Non-Software Industries'/><author><name>Kerry</name><uri>http://www.blogger.com/profile/00365498341161954298</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-5140727620705143469.post-647192943656063014</id><published>2007-11-18T13:48:00.000-08:00</published><updated>2007-11-18T16:49:30.621-08:00</updated><title type='text'>FSOSS 2007: Open Commercial Development</title><content type='html'>I attended an interesting presentation titled, "Open Commercial Development", on Day 1 of the &lt;a href="http://fsoss.senecac.on.ca/2007/"&gt;Free Software &amp;amp; Open Source Symposium&lt;/a&gt; (FSOSS) held at Seneca College in Toronto. The title of the presentation alone piqued my curiosity and prompted me to attend this discussion. It was presented by Lawrence Mandel and Jeffrey Liu, both of whom are software developers involved with &lt;a href="http://www.ibm.com/developerworks/rational/newto/"&gt;IBM Rational Software&lt;/a&gt; at the IBM Toronto Lab. They described Open Commercial Development as a new hybrid model that incorporates some characteristics of the Open Source Model and some characteristics of the proprietary software development model.&lt;br /&gt;&lt;br /&gt;They gave their presentation in two parts. In the first part of the presentation, Mandel reviewed the main criteria for &lt;a href="http://www.opensource.org/docs/osd"&gt;Open Source Software Development&lt;/a&gt; and he discussed "what is" open source as outlined by the &lt;a href="http://www.opensource.org/"&gt;Open Source Initiative&lt;/a&gt; and others.&lt;br /&gt;&lt;br /&gt;Part two of the discussion was presented by Liu wherein he attempted to describe the Open Commercial Development Model to the audience. Some concepts pertaining to the model were unclear to me. My understanding of their model is that Open Commercial Development is an attempt to build communities around software projects through direct contributions by the software's users. My sense is that they want users of the software to provide feedback about the software, particularly when encountering bugs, and suggest fixes that would potentially be integrated back into the software by IBM's developers.&lt;br /&gt;&lt;br /&gt;The presenters said that Open Commercial Development is NOT Open Source Development and Liu gave an analogy of it being like an open-kitchen style of restaurant where customers can see the ingredients of the menu items and see how the food is prepared, but they are not directly involved in the cooking of the food. In the case of Open Commercial Development, customers, or users of the software would have access to the code and they would be able to submit software code and bug fixes for review by IBM's developers. However, my understanding is that people who submit code to IBM would not receive any commercial or financial benefit from doing this, and IBM would retain proprietary ownership of the code.&lt;br /&gt;&lt;br /&gt;Some of this appeared to be contradicted by a few of the misconceptions that the presenters mentioned about their software development model. They said that it was not the intent of the Open Commercial Development Model to get contributors to work for free, to steal the intellectual property of contributors, or to make money from code contributed by the open source community. Despite these reassurances, there was evidence of skepticism from audience members about the Open Commercial Development Model's intent and its feasibility during the audience discussion that followed the presentation.&lt;br /&gt;&lt;br /&gt;A couple of IBM's Open Source Development Projects that were briefly mentioned are &lt;a href="http://www.projectzero.org/wiki/bin/view/Main/About"&gt;Project Zero&lt;/a&gt; and IBM's &lt;a href="http://jazz.net/pub/index.jsp"&gt;Jazz&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5140727620705143469-647192943656063014?l=kmsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmsingh.blogspot.com/feeds/647192943656063014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5140727620705143469&amp;postID=647192943656063014' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/647192943656063014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/647192943656063014'/><link rel='alternate' type='text/html' href='http://kmsingh.blogspot.com/2007/11/fsoss-2007-open-commercial-development.html' title='FSOSS 2007: Open Commercial Development'/><author><name>Kerry</name><uri>http://www.blogger.com/profile/00365498341161954298</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-5140727620705143469.post-3632676227244562357</id><published>2007-11-16T13:59:00.000-08:00</published><updated>2008-12-11T14:08:37.927-08:00</updated><title type='text'>Week 3: Managing and Building Large Source Trees</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/_wD0Sz7ZZ0kg/Rz5MwzsZE1I/AAAAAAAAAAU/kpQOXtw3VtY/s1600-h/minefieldfirstbuild.png"&gt;&lt;/a&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Debug Mozilla Build&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I was not able to do a debug build of &lt;a href="http://en.www.mozilla.com/en/firefox/"&gt;Firefox &lt;/a&gt;on my home PC because it did not meet the necessary &lt;a href="http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites#Hardware_Requirements"&gt;hardware requirements&lt;/a&gt; for a Windows Build that are listed at the &lt;a href="http://developer.mozilla.org/en/docs/Main_Page"&gt;mozilla developer center's web site&lt;/a&gt;. However, I was able to obtain a small, but powerful laptop through my instructor for &lt;a href="http://zenit.senecac.on.ca/wiki/index.php/OSD600"&gt;OSD600&lt;/a&gt; and the &lt;a href="http://www.senecac.on.ca/ori/"&gt;Office of Research and Innovation&lt;/a&gt; (ORI) at &lt;a href="http://www.senecac.on.ca/"&gt;Seneca College&lt;/a&gt;. The laptop is a Dell XPS M1210 with an Intel Core 2 2.0 GHz CPU, 1 GB of RAM and a 150 GB hard drive. This laptop had a somewhat buggy installation of Windows XP Professional on it that seemed to be related to Windows Explorer.&lt;br /&gt;&lt;br /&gt;In order to do the build in Windows XP Pro, I installed Microsoft's Visual Studio 2005 as part of the &lt;a href="http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites#Software_Requirements"&gt;Software Requirements&lt;/a&gt; and the &lt;a href="http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.1.exe"&gt;Mozilla Build 1.1 Package&lt;/a&gt;, which contains all the other software prerequisites necessary for building Mozilla. I carefully followed the &lt;a href="http://developer.mozilla.org/en/docs/Mozilla_Source_Code_%28CVS%29"&gt;instructions to checkout&lt;/a&gt; the latest Firefox source using CVS and the &lt;a href="http://developer.mozilla.org/en/docs/Build_and_Install"&gt;instructions to build&lt;/a&gt; Mozilla according to the Mozilla Developer Center (MDC). However, when I tried using the &lt;em&gt;make&lt;/em&gt; command to checkout and build Firefox, a sh.exe.stackdump file was generated with a STATUS_ACCESS_VIOLATION exception that appeared to be related to MSYS. This occurred on several attempts to build Firefox. I did not retain a copy of the file, otherwise I would display its contents here.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Hats off to Fedora 7!&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;After a number of unsuccessful attempts to build Firefox in Windows XP Pro and not knowing how to solve the problem with MSYS generating a sh.exe.stackdump STATUS_ACCESS_VIOLATION exception, I decided to try an alternate build platform, &lt;a href="http://fedoraproject.org/wiki/Fedora7/FAQ"&gt;Fedora 7&lt;/a&gt;. I received assistance from my instructor, Chris Tyler, to partition my hard drive using a copy of &lt;a href="http://gparted-livecd.tuxfamily.org/"&gt;GParted-LiveCD&lt;/a&gt;. Firstly, I tried installing the 32-bit Live CD version of Fedora 7 but there were problems with the installation so Chris installed the Fedora 7 Live x86_64 version instead. Everything appeared to be alright with this installation of Fedora 7 but I received error messages again when I tried to build Firefox.&lt;br /&gt;&lt;br /&gt;Eventually, out of frustration I decided to download, burn and install the full Fedora 7 x86_64 DVD version for 64-bit PCs. Again, I followed the checkout and build instructions for a debug build of Firefox and this time the build was successful. Below are the contents of my .mozconfig file and the build details for Firefox (&lt;a href="http://www.mozilla.org/projects/minefield/"&gt;Minefield&lt;/a&gt;):&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;.mozconfig&lt;/strong&gt;&lt;br /&gt;#&lt;br /&gt;# See http://www.mozilla.org/build/ for build instructions.&lt;br /&gt;#&lt;br /&gt;# Options for client.mk.&lt;br /&gt;mk_add_options MOZ_CO_PROJECT=browser&lt;br /&gt;mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-ff-debug&lt;br /&gt;mk_add_options MOZ_MAKE_FLAGS=-j4&lt;br /&gt;&lt;br /&gt;# Options for 'configure' (same as command-line options).&lt;br /&gt;ac_add_options --enable-application=browser&lt;br /&gt;ac_add_options --enable-pango&lt;br /&gt;&lt;br /&gt;# Debug options for 'configure'&lt;br /&gt;ac_add_options --enable-debug&lt;br /&gt;ac_add_options --disable-optimize&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;about:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Copyright © 1998-2007 by contributors to the Mozilla Project.&lt;br /&gt;Read the licensing information for this product.&lt;br /&gt;Read the release notes for this version.&lt;br /&gt;See the build configuration used for this version.&lt;br /&gt;Build identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9b2pre) Gecko/2007111515 Minefield/3.0b2pre&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;about:buildconfig&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Build platform&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;target&lt;/strong&gt;&lt;br /&gt;x86_64-unknown-linux-gnu&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Build-tools&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Compiler&lt;br /&gt;&lt;/strong&gt;gcc&lt;br /&gt;&lt;strong&gt;Version&lt;/strong&gt;&lt;br /&gt;gcc version 4.1.2 20070925 (Red Hat 4.1.2-27)&lt;br /&gt;&lt;strong&gt;Compiler flags&lt;/strong&gt;&lt;br /&gt;-Wall -W -Wno-unused -Wpointer-arith -Wcast-align -Wno-long-long -pedantic -pthread -pipe&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Compiler&lt;/strong&gt;&lt;br /&gt;c++&lt;br /&gt;&lt;strong&gt;Compiler&lt;/strong&gt;&lt;br /&gt;gcc version 4.1.2 20070925 (Red Hat 4.1.2-27)&lt;br /&gt;&lt;strong&gt;Compiler flags&lt;/strong&gt;&lt;br /&gt;-fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic -fshort-wchar -pthread -pipe&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Configure arguments&lt;/strong&gt;&lt;br /&gt;--enable-application=browser --enable-pango --enable-debug --disable-optimize&lt;br /&gt;&lt;br /&gt;The elapsed times for the debug build of Firefox on Fedora 7 x86_64 are shown below:&lt;br /&gt;&lt;br /&gt;real 18m 40.126s&lt;br /&gt;&lt;br /&gt;&lt;p&gt;user 15m 15.208s&lt;/p&gt;&lt;p&gt;sys 3m 8.559s&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Back to Windows XP Professional&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I was dissatisfied with my earlier unsuccessful attempts to build Firefox on Windows XP Pro so I decided to do a clean installation of the operating system and Visual Studio 2005. However, again I was unsuccessful at building Firefox and a sh.exe.stackdump file with a STATUS_ACCESS_VIOLATION exception was still being generated. Finally, I decided to do a Google search for this exception and I found some helpful information at the following web site:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.mingw.org/MinGWiki/index.php/FAQ"&gt;http://www.mingw.org/MinGWiki/index.php/FAQ&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;strong&gt;Why does make often crash creating a sh.exe.stackdump file when I try to compile my source code?&lt;/strong&gt;&lt;br /&gt;If you experience random crashes with make as well as with the msysinfo command&lt;br /&gt;(i.e., repeating the command often allows to compile the source code succesfully), the issue might be caused by the Logitech QuickCam software. Here is provided a solution to this issue:&lt;br /&gt;type the command services.msc from a command prompt (you will need administrator privileges to do this), then find the "Logitech Process Monitor" service, and change the "Startup type" from "Auto" to "Manual". Do the same with the "LVSrvLauncher" service. type the command regedit from the command prompt (you will need administrator privileges&lt;br /&gt;to do this), then find the key&lt;br /&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. Among the other REG_SZ keys, there should be three of them related to the Logitech QuickCam, namely: "LogitechCommunicationsManager", "LogitechQuickCamRibbon", "LVCOMSX". Make a backup of the registry, then remove them.&lt;br /&gt;reboot your PC&lt;br /&gt;In this way the Logitech QuickCam deamon won't be available anymore. Nonetheless, the camera will keep working just ok with 3rd party software (e.g., Skype). If you want a less drastic solution, just kill the lvprcsrv.exe process whenever you want to use MSYS by typing at the command prompt: pskill -t lvprcsrv.exe (you will need &lt;a class="wiki" href="http://www.mingw.org/MinGWiki/index.php/PsTools?PHPSESSID=0cf640502e6f78d3208da1275d44f1d2"&gt;PsTools&lt;/a&gt; and administrator privileges to do this). However, as soon as you will plug in the USB cable of your Logitech QuickCam, the deamon will be restarted, while with the first procedure it won't.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The laptop computer that I've been using for the builds has a built-in web cam and a Logitech QuickCam driver and software installed on it. Using this new information, I decided to uninstall the Logitech QuickCam driver and software. After doing this, I followed the checkout and build instructions for a debug build of Firefox and this time the build was successful. Below are the contents of my .mozconfig file and the about: details for Firefox (&lt;a href="http://www.mozilla.org/projects/minefield/"&gt;Minefield&lt;/a&gt;):&lt;/p&gt;&lt;strong&gt;.mozconfig file&lt;/strong&gt;&lt;br /&gt;#&lt;br /&gt;# See http://www.mozilla.org/build/ for build instructions.&lt;br /&gt;#&lt;br /&gt;# Options for client.mk.&lt;br /&gt;mk_add_options MOZ_CO_PROJECT=browser&lt;br /&gt;mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-ff-debug&lt;br /&gt;mk_add_options MOZ_MAKE_FLAGS=-j4&lt;br /&gt;&lt;br /&gt;# Options for 'configure' (same as command-line options).&lt;br /&gt;ac_add_options --enable-application=browser&lt;br /&gt;&lt;br /&gt;# Debug options for 'configure'&lt;br /&gt;ac_add_options --enable-debug&lt;br /&gt;ac_add_options --disable-optimize&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;about:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Copyright © 1998-2007 by contributors to the Mozilla Project.&lt;br /&gt;Read the licensing information for this product.&lt;br /&gt;Read the release notes for this version.&lt;br /&gt;See the build configuration used for this version.&lt;br /&gt;Build identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b2pre) Gecko/2007111512 Minefield/3.0b2pre&lt;/p&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;about:buildconfig&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Build platform&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;target&lt;br /&gt;&lt;/strong&gt;i686-pc-mingw32&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Build tools&lt;br /&gt;Compiler&lt;/strong&gt;&lt;br /&gt;cl&lt;br /&gt;&lt;strong&gt;Version&lt;/strong&gt;&lt;br /&gt;14.00.50727&lt;br /&gt;&lt;strong&gt;Compiler flags&lt;/strong&gt;&lt;br /&gt;-TC -nologo -W3 -Gy -Fd$(PDBFILE)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Compiler&lt;/strong&gt;&lt;br /&gt;cl&lt;br /&gt;&lt;strong&gt;Version&lt;/strong&gt;&lt;br /&gt;14.00.50727&lt;br /&gt;&lt;strong&gt;Compiler flags&lt;/strong&gt;&lt;br /&gt;-GR- -TP -nologo -Zc:wchar_t- -W3 -Gy -Fd$(PDBFILE)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Configure arguments&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;--enable-application=browser --enable-debug --disable-optimize&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The elapsed times for the debug build of Firefox on Windows XP are shown below:&lt;br /&gt;&lt;br /&gt;real 38m 47.610s&lt;br /&gt;user 13m 6.165s&lt;br /&gt;sys 9m 26.050s&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5140727620705143469-3632676227244562357?l=kmsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmsingh.blogspot.com/feeds/3632676227244562357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5140727620705143469&amp;postID=3632676227244562357' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/3632676227244562357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/3632676227244562357'/><link rel='alternate' type='text/html' href='http://kmsingh.blogspot.com/2007/11/week-3-managing-and-building-large.html' title='Week 3: Managing and Building Large Source Trees'/><author><name>Kerry</name><uri>http://www.blogger.com/profile/00365498341161954298</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-5140727620705143469.post-1583280332044754485</id><published>2007-11-05T19:01:00.000-08:00</published><updated>2007-11-06T19:11:11.014-08:00</updated><title type='text'>Week 2: Reaction to "The Cathedral and the Bazaar"</title><content type='html'>In the article, &lt;a href="http://www.firstmonday.org/issues/issue3_3/raymond/"&gt;"The Cathedral and the Bazaar"&lt;/a&gt; by Eric Raymond, the author discusses how he used his own open-source project, &lt;span style="font-style: italic;"&gt;fetchmail&lt;/span&gt;, in an attempt to parallel Linux's development history and to test some theories about software engineering. He discusses these theories from two distinct perspectives, one that he calls the &lt;span style="font-style: italic;"&gt;"cathedral"&lt;/span&gt; model, which represents the commercial world of software development, and a dichotomous view that he refers to as the &lt;span style="font-style: italic;"&gt;"bazaar"&lt;/span&gt; model, representing the Linux world of software development. Raymond argues that these opposing models come from two very different assumptions about the software debugging process.&lt;br /&gt;&lt;br /&gt;I agree that these two models approach software debugging from different perspectives. The bazaar model views software bugs as "shallow" and software problems to be transparent, whereas the cathedral-building model views bugs as "deep" and difficult to trace. There appears to be a number of socio-economic forces that influence the reasons for these two opposing perspectives.&lt;br /&gt;&lt;br /&gt;The cathedral-building style of commercial software development is typically characterized by small to medium sized teams working on a large project in terms of a structured software development process, e.g., analysis, design, development, testing, debugging, documentation, and deployment. Often in large scale projects, these tasks are separated among different work units. In this model, the leadership style of the project manager is usually authoritative and tasks are delegated to subordinates. Software developers often work on projects where they have little or no interest in the end result. In a cathedral-building scenario, software is released infrequently with the goal being "perfect" software. This stems from the broader business goals of profit maximization and customer satisfaction through "bug-free" software.&lt;br /&gt;&lt;br /&gt;In contrast, the mantra of the bazaar model is "release early, release often".  This strategy serves two important purposes. Firstly, it reduces the duplication of debugging work because bug "fixes" are quickly propagated back into the next release. Secondly, it perpetuates interest and developer motivation in the project because code contributors are able to see the results of their efforts and they receive recognition from their peers within the community through feedback. Within this model, developers tend to be motivated and committed to the project because they have a vested interest in the outcome; the software serves an important functional and practical purpose to them. In many instances, hackers are also users of the software too.&lt;br /&gt;&lt;br /&gt;The bazaar model loosely adopts a sociological approach known as the &lt;a href="http://en.wikipedia.org/wiki/Delphi_method"&gt;Delphi Method&lt;/a&gt; and incorporates it in its approach to debugging. Raymond refers to this as Linus' Law and says that "Given enough eyeballs, all bugs are shallow." In effect, the bazaar model harnesses the expertise of a software project's large &lt;span style="font-style: italic;"&gt;community&lt;/span&gt; to fix bugs and resolve software issues.&lt;br /&gt;&lt;br /&gt;The leadership style in the bazaar model is that of a project coordinator. Rather than delegate tasks and set time-lines for project targets, the project coordinator attracts the interest of software users and developers by effectively communicating the project's potential and by fostering a sense of community around a project.&lt;br /&gt;&lt;br /&gt;Each model appears to be sound given the appropriate context. I think that a software development process, such as an &lt;a href="http://en.wikipedia.org/wiki/Agile_software_development"&gt;Agile Software Development&lt;/a&gt; framework for software engineering is a better model for commercial software development in instances when requirements are newly emerging and rapidly changing rather than the cathedral-building model described by Raymond. Some of the principles of agile software development include customer satisfaction through rapid, continuous delivery of useful software, close cooperation between business people and developers, projects built around motivated individuals, the existence of self-organizing teams, and regular adaptation to changing circumstances.&lt;br /&gt;&lt;br /&gt;The bazaar model appears to require certain preconditions to exist to be successful in an open source software development context. One precondition is a large pool of software users and developers with the desire to collectively solve software problems that are of interest to them.  Another important precondition is the existence of a coordinator who can form a sustainable community by rewarding the egos of developers and by capturing and maintaining interest in the project through the effective communication of their vision.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5140727620705143469-1583280332044754485?l=kmsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmsingh.blogspot.com/feeds/1583280332044754485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5140727620705143469&amp;postID=1583280332044754485' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/1583280332044754485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/1583280332044754485'/><link rel='alternate' type='text/html' href='http://kmsingh.blogspot.com/2007/11/week-2-reaction-to-cathedral-and-bazaar.html' title='Week 2: Reaction to &quot;The Cathedral and the Bazaar&quot;'/><author><name>Kerry</name><uri>http://www.blogger.com/profile/00365498341161954298</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-5140727620705143469.post-5798769375504607853</id><published>2007-10-17T19:18:00.000-07:00</published><updated>2007-10-18T07:01:39.489-07:00</updated><title type='text'>Week 2: Reaction to Revolution OS</title><content type='html'>This is very overdue. I'm in the process of catching up with blogging for my "To do" lists. Being completely new to the world of open source development I found the film titled, "&lt;a href="http://www.revolution-os.com/"&gt;Revolution OS&lt;/a&gt;" to be interesting and informative. It chronicles the histories and philosophies of the Free Software and &lt;a href="http://www.opensource.org/"&gt;Open Source&lt;/a&gt; movements in a fairly concise way. It also introduces the viewer to some of the main "characters" in these movements, such as Richard Stallman (the &lt;a href="http://www.gnu.org/"&gt;GNU Project&lt;/a&gt; and &lt;a href="http://www.fsf.org/"&gt;Free Software Foundation&lt;/a&gt;), Linus Torvalds (&lt;a href="http://www.linux.org/"&gt;Linux&lt;/a&gt;) and Eric Raymond ("&lt;a href="http://www.firstmonday.org/issues/issue3_3/raymond/"&gt;The Cathedral and the Bazaar&lt;/a&gt;" author).&lt;br /&gt;&lt;br /&gt;I found it interesting how the open source development philosophy and movement grew and  blossomed from those of free software. There were a number of factors that seemed to fall into place at just the right time for this to happen. One of the main factors was Linus Torvald's development of the Linux OS kernel and the growth of Linux OS users. Other factors include the following:  the growth in popularity among ISP's of the &lt;a href="http://www.apache.org/"&gt;Apache web server&lt;/a&gt;, which can run on Linux; the growth in Internet use by individuals, businesses, organizations and institutions; Netscape adopting the open source philosophy to compete with Microsoft; and the involvement of database software development companies, such as Oracle.&lt;br /&gt;&lt;br /&gt;I had some difficulty understanding the differences between the free software philosophy and the open source philosophy from the film. The main difference that I understood was that the open source philosophy accepts the commercialization of freely developed and distributed software and that the free software philosophy is less accepting of its commercialization.&lt;br /&gt;&lt;br /&gt;An analogy came to my mind as I watched the film. The open source "revolution" reminded me of the late nineteenth and early twentieth centuries when the automobile was being developed. Richard  Stallman was like one of the very early automobile inventors. He had a revolutionary concept that he was growing with the start of the Free Software Foundation and the GNU project. Then along came Linus Torvalds who developed the Linux kernel and the Linux operating system. This was analogous to the invention  of the internal combustion engine, which was further improved by many different contributors. Companies such as VA Linux and RedHat Linux were involved with the mass distribution and commercialization of Linux, similar to Ford and GM's mass production and distribution of automobiles for commercial gain.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5140727620705143469-5798769375504607853?l=kmsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmsingh.blogspot.com/feeds/5798769375504607853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5140727620705143469&amp;postID=5798769375504607853' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/5798769375504607853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/5798769375504607853'/><link rel='alternate' type='text/html' href='http://kmsingh.blogspot.com/2007/10/week-2-reaction-to-revolution-os.html' title='Week 2: Reaction to Revolution OS'/><author><name>Kerry</name><uri>http://www.blogger.com/profile/00365498341161954298</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-5140727620705143469.post-4906654237810315854</id><published>2007-09-10T16:58:00.000-07:00</published><updated>2007-09-10T17:33:45.590-07:00</updated><title type='text'>Welcome Message</title><content type='html'>Hello, my name is Kerry. Welcome to my Open Source@Seneca Blog. I'll be adding entries to my blog on a regular basis to track my progress in open source development for the &lt;a href="http://www.mozilla.org/about"&gt;Mozilla Project&lt;/a&gt; at &lt;a href="http://cs.senecac.on.ca/"&gt;Seneca College&lt;/a&gt; in Toronto.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5140727620705143469-4906654237810315854?l=kmsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kmsingh.blogspot.com/feeds/4906654237810315854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5140727620705143469&amp;postID=4906654237810315854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/4906654237810315854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5140727620705143469/posts/default/4906654237810315854'/><link rel='alternate' type='text/html' href='http://kmsingh.blogspot.com/2007/09/welcome-message.html' title='Welcome Message'/><author><name>Kerry</name><uri>http://www.blogger.com/profile/00365498341161954298</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></feed>
