<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Genotrance</title>
	<atom:link href="http://genotrance.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://genotrance.wordpress.com</link>
	<description>Random thoughts, ideas and experiences</description>
	<lastBuildDate>Mon, 05 May 2008 06:00:41 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
		<url>http://www.gravatar.com/blavatar/684f08af9f559760629fbdd9e8786ec4?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Genotrance</title>
		<link>http://genotrance.wordpress.com</link>
	</image>
			<item>
		<title>Twitter &#8211; I finally get it</title>
		<link>http://genotrance.wordpress.com/2008/05/04/twitter-i-finally-get-it/</link>
		<comments>http://genotrance.wordpress.com/2008/05/04/twitter-i-finally-get-it/#comments</comments>
		<pubDate>Mon, 05 May 2008 05:59:22 +0000</pubDate>
		<dc:creator>genotrance</dc:creator>
				<category><![CDATA[Blog Update]]></category>

		<guid isPermaLink="false">http://genotrance.wordpress.com/?p=95</guid>
		<description><![CDATA[Some of you may have noticed the Twitter feed on the right. This is a brand new, albeit late in early adopter terms, addition to my online life. For the longest time, I really wondered what the whole point of Twitter was. People just went on and on about the phenomenon and I never quite [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=95&subd=genotrance&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Some of you may have noticed the Twitter feed on the right. This is a brand new, albeit late in early adopter terms, addition to my online life. For the longest time, I really wondered what the whole point of Twitter was. People just went on and on about the phenomenon and I never quite got it. Why on earth would anyone be interested in being notified about what I am up to, every moment of my life?</p>
<p><span id="more-95"></span>Well, I finally figured out how Twitter applies to me. I will tweet every time I have something to report on when I am programming or dealing with technical issues, pretty much the same theme as this blog. None of the personal, &#8220;I&#8217;m driving to work&#8221;, kinds of tweets, only stuff that may prove useful for someone out there. The feed on the right will help keep everything I report, posts and tweets alike, in one place.</p>
<p>The reason I blog, and also tweet, is not to address a captive audience on a common topic, but just to post searchable information to the web for anyone who is encountering similar situations. It gives me the satisfaction that I am contributing to the community in some way. Majority of the hits on this blog are from Google and other search engines convincing me that reality aligns with my intentions. The effort is well worth it.</p>
<p>It is much easier to tweet than to blog since the message size is so much smaller. Being the kind of writer who obsesses over every sentence twenty times before posting, it takes me a long time to get posts out. It also discourages me from posting often enough. Twitter will provide the avenue to report frequently, since I am always up to something but seldom have the time to type out detailed posts.</p>
<p>While long consolidated posts on this blog will continue to appear, there will be several smaller issues reported in tweets, as and when things surface. As a result, a lot more of my experiences will get logged unlike on the blog where only big things make it, several days/weeks later. It will also give you a glimpse into what goes on in between all these blog posts.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/genotrance.wordpress.com/95/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/genotrance.wordpress.com/95/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/genotrance.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/genotrance.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/genotrance.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/genotrance.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/genotrance.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/genotrance.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/genotrance.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/genotrance.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/genotrance.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/genotrance.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=95&subd=genotrance&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://genotrance.wordpress.com/2008/05/04/twitter-i-finally-get-it/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ff1c4e221d5132270aa4f03eeca16e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">genotrance</media:title>
		</media:content>
	</item>
		<item>
		<title>My Vim customization</title>
		<link>http://genotrance.wordpress.com/2008/02/04/my-vim-customization/</link>
		<comments>http://genotrance.wordpress.com/2008/02/04/my-vim-customization/#comments</comments>
		<pubDate>Mon, 04 Feb 2008 22:49:31 +0000</pubDate>
		<dc:creator>genotrance</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://genotrance.wordpress.com/?p=94</guid>
		<description><![CDATA[In my previous post, I mentioned how I migrated back to Vim for my development environment. Vim is fantastic but the default settings may not suit your needs. Given that Vim does not provide a GUI based configuration mechanism, getting it to fit your needs will take a bit of tweaking .VIM files and scavenging [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=94&subd=genotrance&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In my <a href="/2008/01/22/tortoisesvn-directory-diff/">previous post</a>, I mentioned how I migrated back to <a href="http://www.vim.org" target="_blank">Vim</a> for my development environment. Vim is fantastic but the default settings may not suit your needs. Given that Vim does not provide a GUI based configuration mechanism, getting it to fit your needs will take a bit of tweaking .VIM files and scavenging Google for tips. This was part of the reason why I stuck to <a href="http://www.eclipse.org" target="_blank">Eclipse</a> for so long.</p>
<p>Anyway, I have finally customized Vim enough to use it full time. Below is a list of my customizations; perhaps it will be of use to you.</p>
<p><span id="more-94"></span><a href="http://flickr.com/photos/genotrance/2243497974/"><img src="http://farm3.static.flickr.com/2240/2243497974_4f76118ae9.jpg?v=0" alt="Vim Screenshot" align="bottom" height="360" width="474" /></a><b></b></p>
<p><b>No Cream with that</b></p>
<p><a href="http://cream.sf.net" target="_blank">Cream</a> is a really popular Vim customization. It demonstrates the flexibility of Vim with its extensive enhancements, convenient packaging and GUI based settings management. If only Vim packaged everything the way Cream does, customization would be so much easier.</p>
<p>I did try Cream prior to attempting my own customization. However, Cream does away with one very essential feature of Vim: Insert Mode. This is done with the spirit to make Vim easier for beginners. Cream does provide a trap door to access this mode but it is very limited and frustrating. After struggling with this for a few days, I got fed up with Cream and decided to start with Vim as a base and customize it to my needs instead of adjusting to Cream&#8217;s vision.</p>
<p><b>Installing Vim</b></p>
<p>I ended up using the base Vim installer packaged and distributed by Cream. You can find the latest release <a href="http://downloads.sourceforge.net/cream/" target="_blank">here</a>. You can also use <a href="http://appsnap.genotrance.com" target="_blank">AppSnap</a> to install Vim for you. It will be much faster if nothing else.</p>
<p>Vim will install by default to <i>C:\Program Files\Vim</i>. There will be a <i>_vimrc</i> in that directory with all the binaries in a sub-directory. All settings in this <i>_vimrc</i> will get loaded by Vim on startup so all the following customizations will go there.</p>
<p><b>GUI customizations</b></p>
<p>The GUI allows for customization of various aspects with a simple setting. I have opted for the menu bar and tab bar and disabled all other enhancements. The following lines need to be added to <i>_vimrc</i> in order to achieve this:</p>
<blockquote><p>set guioptions=em<br />
set showtabline=2</p></blockquote>
<p>Setting &#8216;e&#8217; in <i>guioptions</i> ensures that the tab bar is displayed by the GUI. Setting <i>showtabline</i> to 2 further ensures that the tab bar is always displayed, even if there is only one file open. Setting &#8216;m&#8217; in <i>guioptions</i> ensures that the menu bar is displayed.</p>
<p>Refer to the Vim documentation for <a href="http://www.vim.org/htmldoc/options.html#'guioptions'" target="_blank"><i>guioptions</i></a> to see all the available options.</p>
<p><b>Tab navigation like Firefox</b></p>
<p>I am very comfortable with the tab navigation shortcuts in Firefox so it only made sense to do the same within Vim. This can be done with the following settings:</p>
<blockquote><p>:nmap &lt;C-S-tab&gt; :tabprevious&lt;cr&gt;<br />
:nmap &lt;C-tab&gt; :tabnext&lt;cr&gt;<br />
:imap &lt;C-S-tab&gt; &lt;ESC&gt;:tabprevious&lt;cr&gt;i<br />
:imap &lt;C-tab&gt; &lt;ESC&gt;:tabnext&lt;cr&gt;i<br />
:nmap &lt;C-t&gt; :tabnew&lt;cr&gt;<br />
:imap &lt;C-t&gt; &lt;ESC&gt;:tabnew&lt;cr&gt;i<br />
:map &lt;C-w&gt; :tabclose&lt;cr&gt;</p></blockquote>
<p>This maps Ctrl-Tab and Ctrl-Shift-Tab to navigate between tabs, Ctrl-T to create a new tab and Ctrl-W to close the current tab.</p>
<p><b>Custom Font</b></p>
<p>Sometime in the past, I looked for a decent programming font and found <a href="http://www.proggyfonts.com/index.php?menu=download" target="_blank">ProggyClean </a>which, in my opinion, is very readable and pleasant. I&#8217;ve used ProggyClean with Eclipse for several years so Vim had to do the same. You can download and install the TTF fonts from <a href="http://www.proggyfonts.com/download/download_bridge.php?get=ProggyClean.ttf.zip">this link</a>. There are many variations of ProggyClean but I just stick to the base version.</p>
<p>The next thing that needs to be done is to get Vim to use this font by default. This can be done with the following line in <i>_vimrc</i>:</p>
<blockquote><p>set gfn=ProggyCleanTT:h12:cANSI</p></blockquote>
<p>ProggyClean is designed for and looks best at size 12. By the way, the default font in Vim is <a href="http://en.wikipedia.org/wiki/Fixedsys" target="_blank">FixedSys</a> so if you prefer that then you don&#8217;t need to change anything. The above syntax can also be used to set any other font of your preference as the default.</p>
<p><b>Color Scheme</b></p>
<p>When I was playing with Cream, I came across its Terminal color scheme. Since I really liked this scheme, I incorporated it into my customization. You can get it from <a href="http://cream.cvs.sourceforge.net/cream/cream/cream-colors-terminal.vim?revision=1.9&amp;view=markup">here</a>. Save it to <i>C:\Program Files\Vim\vim71\colors\terminal.vim</i> and add the following line in <i>_vimrc</i>:</p>
<blockquote><p>colorscheme terminal</p></blockquote>
<p>Vim (and Cream) ship with several other color schemes so if you prefer another one, you can set it as default as above instead.</p>
<p><b>Cream Statusline</b></p>
<p>In the above screenshot, you can see a status bar at the bottom. I copied that from Cream. Majority of the code was in one <a href="http://cream.cvs.sourceforge.net/cream/cream/cream-statusline.vim" target="_blank">file</a> but it used several common functions from other parts of Cream. I copied all those dependencies into a single file and got it to work. You can get the file from the .ZIP file further down in this post.</p>
<p>You could also re-create it based on the latest versions by copying <i>cream-statusline.vim</i> to the Vim plugin directory. Every time you startup Vim, it will complain with unresolved dependencies. Look for those functions in the Cream source and copy them one by one. Eventually, you will have a functioning status bar.</p>
<p><b>Maximize on startup</b></p>
<p>I like my windows to be maximized, especially my text editor, so I needed Vim to maximize on startup. This can be done easily with the following Vim <a href="http://vim.sourceforge.net/scripts/script.php?script_id=1302" target="_blank">script</a>. Just download the .ZIP, extract the contents to the <i>C:\Program Files\Vim\vim71\plugin</i> directory and Vim will start maximizing on startup. It couldn&#8217;t get any easier.</p>
<p><b>Python Tabs </b></p>
<p>I code in Python extensively so I had to make sure that Vim interpreted tabs correctly.  The settings below ensure that tabs are replaced by spaces and map to four spaces.</p>
<blockquote><p> set tabstop=4<br />
set shiftwidth=4<br />
set expandtab<br />
set softtabstop=4<br />
set autoindent</p></blockquote>
<p><b>SuperTab</b><br />
No one can deny the convenience of tab completion. Vim has completion built in (Ctrl-P) but SuperTab is much prettier and cooler. This Vim script can be downloaded from <a href="http://www.vim.org/scripts/script.php?script_id=1643" target="_blank">here</a>. Again, extract the .ZIP to the Vim plugin directory and the tab key will automatically invoke SuperTab.</p>
<p><b>Function taglist</b></p>
<p>It is not a feature I used very much in Eclipse, but a taglist helps to quickly get to a specific function in a source file. <a href="http://vim-taglist.sourceforge.net/" target="_blank">Vim Taglist</a> provides this feature by leveraging <a href="http://ctags.sourceforge.net/" target="_blank">Ctags</a>. Just download the .ZIP for Vim Taglist and extract to the Vim plugin directory. Next, download Ctags for Windows and extract <i>ctags.exe</i> to <i>C:\Program Files\Vim\vim71</i>.</p>
<p>Next, add the following lines to <i>_vimrc:</i></p>
<blockquote><p>let Tlist_Sort_Type = &#8220;name&#8221;<br />
:nmap &lt;F3&gt; :TlistToggle&lt;cr&gt;</p></blockquote>
<p>The next time you are editing code, hit F3 and a taglist will show up. Clicking any item in the list will move the cursor to that item in the source. Press F3 again and the taglist will disappear. You can change the shortcut by changing the F3 mapping above.</p>
<p><b>File Explorer</b><b></b></p>
<p>Another script I have incorporated is a simple file explorer &#8211; VTreeExplorer. It is not quite as pretty as Eclipse but is very functional. I do not use this very much and prefer using Windows Explorer. However, it is worth having since it is quickly accessible within Vim. You can download it <a href="http://www.vim.org/scripts/script.php?script_id=184" target="_blank">here</a>. Extract the .ZIP to the plugin directory and add the following lines to <i>_vimrc</i>.</p>
<blockquote><p>let treeExplVertical=1<br />
let treeExplWinSize=35<br />
let treeExplDirSort=1<br />
let treeExplNoList=1<br />
:nmap &lt;F2&gt; :VSTreeExplore&lt;cr&gt;</p></blockquote>
<p>I have mapped F2 to open the explorer which can be changed per your convenience.</p>
<p><b>Miscellaneous customizations</b></p>
<p>Some other customizations I have are as follows:</p>
<blockquote><p>set nobackup<br />
set number<br />
set nuw=6</p></blockquote>
<p>The <i>nobackup</i> option prevents Vim from creating backup files. Otherwise, everytime a file changes, Vim will create a .BAK file with the original contents. I find this annoying since I have to manually delete these files.</p>
<p>The <i>number</i> option enables line numbers, an important piece of information for a programmer. The <i>nuw</i> option sets the line number width to 6 which makes it a little neater.</p>
<p><b>File Associations</b></p>
<p>The Cream installer does not add the &#8216;Edit with Vim&#8217; right-click option, something I used all the time earlier. In addition, I wanted to open all files associated with Vim in a tab in an existing Vim session. All this can be achieved with the following registry changes. Just copy them to a .REG file and double-click the file.</p>
<blockquote><p>Windows Registry Editor Version 5.00</p>
<p>[HKEY_CLASSES_ROOT\*\shell\Edit with Vim]<br />
@=&#8221;"</p>
<p>[HKEY_CLASSES_ROOT\*\shell\Edit with Vim\command]<br />
@=&#8221;\&#8221;C:\\Program Files\\vim\\vim71\\gvim.exe\&#8221; -p &#8211;remote-tab-silent \&#8221;%1\&#8221; \&#8221;%*\&#8221;"</p>
<p>[HKEY_CLASSES_ROOT\Applications\gvim.exe\shell\open\command]<br />
@=&#8221;\&#8221;C:\\Program Files\\vim\\vim71\\gvim.exe\&#8221; -p &#8211;remote-tab-silent \&#8221;%1\&#8221; \&#8221;%*\&#8221;"</p></blockquote>
<p><b>Summary</b></p>
<p>The post above goes through a bunch of very common Vim customizations. You can get all of them by downloading <a href="http://genotrance.com/code/vim.zip">this .ZIP file</a> and extracting it to your Vim directory. You can then double click the vim.reg file and set up what is described in the file associations section above. In my case, these simple changes made Vim a lot more usable and convenient. The real power of Vim is in knowing the advanced functionality that makes people rage wars.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/genotrance.wordpress.com/94/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/genotrance.wordpress.com/94/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/genotrance.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/genotrance.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/genotrance.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/genotrance.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/genotrance.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/genotrance.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/genotrance.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/genotrance.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/genotrance.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/genotrance.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=94&subd=genotrance&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://genotrance.wordpress.com/2008/02/04/my-vim-customization/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ff1c4e221d5132270aa4f03eeca16e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">genotrance</media:title>
		</media:content>

		<media:content url="http://farm3.static.flickr.com/2240/2243497974_4f76118ae9.jpg?v=0" medium="image">
			<media:title type="html">Vim Screenshot</media:title>
		</media:content>
	</item>
		<item>
		<title>TortoiseSVN directory diff</title>
		<link>http://genotrance.wordpress.com/2008/01/22/tortoisesvn-directory-diff/</link>
		<comments>http://genotrance.wordpress.com/2008/01/22/tortoisesvn-directory-diff/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 17:43:28 +0000</pubDate>
		<dc:creator>genotrance</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://genotrance.wordpress.com/2008/01/22/tortoisesvn-directory-diff/</guid>
		<description><![CDATA[Recently, I tossed out Eclipse for a simpler Vim + TortoiseSVN development environment. I&#8217;ve used Eclipse for several years and love the integration. However, the 30 second startup time has always discouraged me from starting it up too often. Not to mention the 100+ MB installation size, excessive memory usage and tedious setup and update [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=93&subd=genotrance&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Recently, I tossed out <a href="http://www.eclipse.org/">Eclipse</a> for a simpler <a href="http://www.vim.org/">Vim</a> + <a href="http://tortoisesvn.net/">TortoiseSVN</a> development environment. I&#8217;ve used Eclipse for several years and love the integration. However, the 30 second startup time has always discouraged me from starting it up too often. Not to mention the 100+ MB installation size, excessive memory usage and tedious setup and update process. Eclipse rocks and I miss the environment every day, but I need something faster and more nimble that can adapt to my 10 minute coding sessions.</p>
<p><span id="more-93"></span>I evaluated a <a href="http://www.activestate.com/Products/komodo_edit/">whole</a> <a href="http://intype.info/">bunch</a> of <a href="http://www.e-texteditor.com/">potentially</a> <a href="http://www.jedit.org/">lighter</a> <a href="http://www.scintilla.org/SciTE.html">tools</a> but nothing fit me like I wanted. I&#8217;ve always been a Vim fan so that ended up being the only way to go. After spending a day customizing it to my needs (another pain-ridden process that had discouraged me in the first place) I have a setup that I can take anywhere with me. I&#8217;ll write about my Vim configuration in the near future. Now that I had my editor, I needed an SVN client and TortoiseSVN was a no brainer in that department.</p>
<p>TortoiseSVN has every feature that I need including integration with <a href="http://www.araxis.com/merge/">Araxis Merge</a>, something I missed with Eclipse. But for whatever reason, I was unable to get it to display the &#8220;Diff&#8221; option when I right clicked on a folder. Now, I like to check my diffs a whole bunch of times before I deliver anything so multiply that with several file changes across multiple directories and it soon gets too tedious. Right clicking every single file, one at a time to see the changes I had made was just not acceptable. </p>
<p>Why TortoiseSVN was not displaying the diff option made no sense but I found an alternative. Just make the following registry changes and you are good to go. You will get a &#8220;TortoiseDiff&#8221; right-click option and that will bring up the directory diff. The disadvantage is that every folder will display this menu option but at least the option is available.</p>
<blockquote><p><font size="-3" color="#E58712">Windows Registry Editor Version 5.00</p>
<p>[HKEY_CLASSES_ROOT\Folder\shell\TortoiseDiff]<br />
@=&#8221;"</p>
<p>[HKEY_CLASSES_ROOT\Folder\shell\TortoiseDiff\command]<br />
@=&#8221;\&#8221;C:\\Program Files\\TortoiseSVN\\bin\\TortoiseProc.exe\&#8221; /command:diff /path:\&#8221;%1\&#8221;"<br />
</font>
</p></blockquote>
<p>Select the code above and save it to a text file called tortoisediff.reg. Make sure the path to TortoiseProc.exe is correct. Then double click the file and it will update your registry. As usual, make these changes at your own risk.</p>
<p>For more TortoiseSVN command line options, check out <a href="http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-automation.html">this page</a>. Turns out you can automate a lot of stuff pretty easily.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/genotrance.wordpress.com/93/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/genotrance.wordpress.com/93/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/genotrance.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/genotrance.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/genotrance.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/genotrance.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/genotrance.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/genotrance.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/genotrance.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/genotrance.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/genotrance.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/genotrance.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=93&subd=genotrance&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://genotrance.wordpress.com/2008/01/22/tortoisesvn-directory-diff/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ff1c4e221d5132270aa4f03eeca16e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">genotrance</media:title>
		</media:content>
	</item>
		<item>
		<title>Move to WordPress.com</title>
		<link>http://genotrance.wordpress.com/2007/09/30/move-to-wordpresscom/</link>
		<comments>http://genotrance.wordpress.com/2007/09/30/move-to-wordpresscom/#comments</comments>
		<pubDate>Sun, 30 Sep 2007 21:43:05 +0000</pubDate>
		<dc:creator>genotrance</dc:creator>
				<category><![CDATA[Blog Update]]></category>

		<guid isPermaLink="false">http://genotrance.wordpress.com/2007/09/30/move-to-wordpresscom/</guid>
		<description><![CDATA[Some of you may have noticed that this blog, and my wife&#8217;s blog, are now hosted on WordPress.com. I moved since I want to stop depending on my server at home for my web hosting needs. The migration was not too difficult since I&#160;was using WordPress for the blogs anyway, but was not as smooth [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=92&subd=genotrance&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Some of you may have noticed that this blog, and my <a href="http://khado.genotrance.com" target="_blank">wife&#8217;s blog</a>, are now hosted on <a href="http://wordpress.com" target="_blank">WordPress.com</a>. I moved since I want to stop depending on my server at home for my web hosting needs. The migration was not too difficult since I&nbsp;was using WordPress for the blogs anyway, but was not as smooth as I hoped.</p>
<p><span id="more-92"></span>
<p><strong>Where did my pages go?</strong></p>
<p>Since&nbsp;I was&nbsp;using an older version of WordPress that didn&#8217;t support exporting blog data, I had two options:-</p>
<ul>
<li>Install <a href="http://technosailor.com/wordpress-to-wordpress-import/" target="_blank">a plugin</a> that would export the blog content  </li>
<li>Upgrade to the newer version that supported exporting natively</li>
</ul>
<p>Since it was easier to install the plugin, I tried that first. The export worked fine but when I imported the data into WordPress.com, my pages didn&#8217;t show up. They were imported alright, but for some reason, they weren&#8217;t visible, either on the web site or in the admin area.</p>
<p>Thinking there was something wrong with the plugin, I tried the second option. I upgraded to&nbsp;version 2.2.3&nbsp;and created a second export file. Importing that to WordPress.com didn&#8217;t help either. The pages were detected in the import but were still invisible.</p>
<p>After some Googling, I gave up and manually re-created every page by copy/pasting the content from my old blog. I don&#8217;t have too many pages on my blog so it wasn&#8217;t too bad.&nbsp;However,&nbsp;all&nbsp;the original page comments were lost since it wasn&#8217;t possible to link them to the new pages.</p>
<p>There&#8217;s a bug somewhere,&nbsp;either in the export or&nbsp;import step. Regardless, it&nbsp;was very unfortunate to lose some really nice comments.</p>
<p><strong>What about media?</strong></p>
<p><u>Blog Images</u></p>
<p>My blog doesn&#8217;t have too many images, just a couple here and there in some posts and application pages. My <a href="http://khado.genotrance.com" target="_blank">wife&#8217;s blog</a>, though, is a food blog, so there&#8217;s tons of images. Since I have a <a href="http://flickr.com" target="_blank">Flickr</a> account, I just posted all the images there and linked to them. It was a little time consuming to download each image, upload to Flickr and then update each affected post, but at least it was easy to take care of.</p>
<p><u>Music</u></p>
<p>My <a href="/music/">music pages</a> link to a whole bunch of songs that I&#8217;ve composed. All the source files (<a href="http://www.lim.com.au/ImpulseTracker/" target="_blank">Impulse Tracker</a>)&nbsp;were already on <a href="http://scene.org/" target="_blank">Scene.org</a>, the awesome non-profit that has supported the electronic art scene for several years. The MP3 files, though, were still hosted on my server all these years since I didn&#8217;t feel like taking up the space on Scene.org. So I finally had to go&nbsp;ahead&nbsp;and&nbsp;upload the MP3 files as well. They add up to 600MB so it&#8217;s not too bad. A big thanks to the folks that support Scene.org for their generosity.</p>
<p>What I had to remove though were links to audio CD images for the albums I released which add up to 4.5GB. I don&#8217;t think there is a sufficient demand for them anyway. People seem satisfied with MP3 files.</p>
<p><u>Applications</u></p>
<p>Almost all my applications were already hosted on&nbsp;<a href="http://code.google.com/" target="_blank">Google Code</a>,&nbsp;in terms of source code and binaries. <a href="/applications/mshare/" target="_blank">Mshare</a> was not, so I created a project and migrated it there. I also removed all links to my server so now, none of my application pages link to my server anymore.</p>
<p><strong>Pros and Cons</strong></p>
<p>Moving to WordPress.com has been a mixed blessing. There&#8217;s a long list of benefits:-</p>
<ul>
<li>The site is much faster now  </li>
<li>Feature upgrades will magically appear, I have to do nothing  </li>
<li>I don&#8217;t&nbsp;need to worry about security, WordPress IT guys have to  </li>
<li>It is completely free, no investments (like electricity when self-hosting)  </li>
<li>Large community so odds of random people visiting is higher</li>
</ul>
<p>The things that bother me are the following:-</p>
<ul>
<li>I lost my page comments  </li>
<li>They charge $10/year for CNAME redirection, I&#8217;m using URL forwarding which isn&#8217;t as good  </li>
<li>Because of URL forwarding, I have no idea who my referrers are anymore, everybody seems to come from <a href="http://blog.genotrance.com">http://blog.genotrance.com</a>  </li>
<li>They could delete my blog for any random reason  </li>
<li>They don&#8217;t allow me to use Google Analytics, my history there is now useless  </li>
<li>I can&#8217;t advertise on my blog if I ever decide to</li>
</ul>
<p><strong>Conclusion</strong></p>
<p>Usually, people go the other way. They start a blog on some popular blog site and when it is successful, they look for independence. For now, I want freedom from self-hosting so I think this is a good move. When one of the cons I mentioned become unacceptable, I&#8217;ll probably buy some web space and move there. Until then, this is a great bargain and the most sensible thing to do for small time bloggers&nbsp;like me.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/genotrance.wordpress.com/92/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/genotrance.wordpress.com/92/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/genotrance.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/genotrance.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/genotrance.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/genotrance.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/genotrance.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/genotrance.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/genotrance.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/genotrance.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/genotrance.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/genotrance.wordpress.com/92/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=92&subd=genotrance&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://genotrance.wordpress.com/2007/09/30/move-to-wordpresscom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ff1c4e221d5132270aa4f03eeca16e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">genotrance</media:title>
		</media:content>
	</item>
		<item>
		<title>Turning to Akismet</title>
		<link>http://genotrance.wordpress.com/2007/03/10/turning-to-akismet/</link>
		<comments>http://genotrance.wordpress.com/2007/03/10/turning-to-akismet/#comments</comments>
		<pubDate>Sat, 10 Mar 2007 06:04:04 +0000</pubDate>
		<dc:creator>genotrance</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://genotrance.wordpress.com/2007/03/10/turning-to-akismet/</guid>
		<description><![CDATA[We live in a world of wasted effort. I get my daily dose of email spam despite some pretty decent filtering. And ever since&#160;I started this blog a few months back, I gotten to experience the joys of comment spam first hand.

Like any new blog, I started out without comment moderation but after a few [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=68&subd=genotrance&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We live in a world of wasted effort. I get my daily dose of email spam despite some <a href="http://www.nuclearelephant.com/" target="_blank">pretty decent filtering</a>. And ever since&nbsp;I started this blog a few months back, I gotten to experience the joys of comment spam first hand.</p>
<p><span id="more-68"></span>
<p>Like any new blog, I started out without comment moderation but after a few weeks, the amount of spam became unbearable and I couldn&#8217;t keep up with deleting them. While moderating comments is much better than an open site, it is still tedious and boring to clean up the moderation queue. Few people post legitimate comments which hide in the haystack of spam. For the longest time, I put up with it since I didn&#8217;t have the time to research the issue.</p>
<p>Lately, having gotten fed up with the spam and the efforts involved in moderation, I decided to give <a href="http://akismet.com/" target="_blank">Akismet</a> a try.&nbsp;I had avoided Akismet for the longest time since I wasn&#8217;t keen on registering on <a href="http://wordpress.com/" target="_blank">WordPress.com</a>. One more login to deal with&#8230;</p>
<p>Well, I&#8217;m glad I activated Akismet. It&#8217;s working very well and has been 100% accurate so far. I can be a lot more confident when I go through the moderation queue. And I no longer need to see the spam in my inbox since Akismet does such a good job.</p>
<p>I still have to look for legitimate comments in the Akismet queue but the odds of a false positive seem low so far. Long story short, turn on Akismet and have at least one line of defence against spam.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/genotrance.wordpress.com/68/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/genotrance.wordpress.com/68/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/genotrance.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/genotrance.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/genotrance.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/genotrance.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/genotrance.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/genotrance.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/genotrance.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/genotrance.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/genotrance.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/genotrance.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=68&subd=genotrance&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://genotrance.wordpress.com/2007/03/10/turning-to-akismet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ff1c4e221d5132270aa4f03eeca16e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">genotrance</media:title>
		</media:content>
	</item>
		<item>
		<title>Automating the Encoder</title>
		<link>http://genotrance.wordpress.com/2007/02/16/automating-the-encoder/</link>
		<comments>http://genotrance.wordpress.com/2007/02/16/automating-the-encoder/#comments</comments>
		<pubDate>Fri, 16 Feb 2007 18:08:28 +0000</pubDate>
		<dc:creator>genotrance</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://genotrance.wordpress.com/2007/02/16/automating-the-encoder/</guid>
		<description><![CDATA[I recently shared my solution for encoding home videos I record using a DVD camcorder. While the solution helped me understand the encoding process, it was not exactly user friendly in terms of the number of steps involved. Being the automation freak that I am, I have written a Python script that takes care of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=67&subd=genotrance&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I recently <a href="/2006/07/18/decoding-the-encoder/">shared</a> my solution for encoding home videos I record using a DVD camcorder. While the solution helped me understand the encoding process, it was not exactly user friendly in terms of the number of steps involved. Being the automation freak that I am, I have written a Python script that takes care of the entire process in a single step.</p>
<p><span id="more-67"></span></p>
<p><strong>The Main Issues</strong></p>
<p>The main issues with the original solution were as follows:-</p>
<p><u>Copying the VOB files to your hard disk</u></p>
<p>Copying an entire DVD to your hard disk is no joke. It takes up a lot of space and is time consuming and boring. This had to be done since VOBMerge didn&#8217;t like to operate on VOB files directly on the DVD.</p>
<p><u>Using DVD Decrypter for corrupt VOBs</u></p>
<p>Corrupt VOBs are the biggest pain. First of all, you have to download DVD Decrypter to solve this problem. Second of all, it is a trial and error method where you had to calculate which megabyte was failing and uncheck the corresponding cell and try again, only to find another broken cell.</p>
<p>In addition, it would take out major chunks of data from your VOB per cell so if you had a tiny scratch, you potentially lost a few megs of data instead of a few 100K. If you had multiple corrupt VOBs, good luck maintaining high spirits.</p>
<p><u>Using VOBMerge to merge related VOBS</u></p>
<p>We have already been forced to copy the VOBs to the hard drive for VOBMerge to work. Now, VOBMerge will happily double the data on our hard drive through the merging process.</p>
<p><u>Running two batch files on each merged VOB</u></p>
<p>The merged VOB now has to be processed by two different batch files, one to create a downloadable version of the video and the other for archival purposes. These steps could take a lot of time so you could expect to lose valuable CPU time while you decided to take a walk.</p>
<p><u>Repeat for each unique video</u></p>
<p>Okay, so we got done with the first video. Now we have to repeat the merging and encoding all over again for every other video. Let me also mention the time spent deleting and copying VOB files around in between encodes in case you don&#8217;t have enough space to accommodate the entire DVD, merged VOBs and the final encoded output all at once.</p>
<p><strong>The Solution</strong></p>
<p>Instead of dealing with so many external utilities, I just whipped together a Python script that does all of the above in one step. All you need to do is decide how the seperate VOBs need to be merged, what the output videos need to be named and an acceptable buffer size in case some VOBs are corrupt.</p>
<p>Below are the command line options of vobenc.py.</p>
<pre>Usage:
  -j joblist         : List of jobs to execute
  -f jobfile         : File containing list of jobs to execute
  -s steplist        : List of step ids from config.ini to execute on each job
                       [default: all steps]
                       E.g. -s 1,2,3
  -p pathtovobfiles  : Location of the VOB files
                       [default: current directory]
  -d destinationpath : Location where converted files should be stored
                       [default: current directory]
  -c configfile      : Name of configuration file to load steps from
                       [default: config.ini]
  -b buffersize      : Number of bytes to copy at a time
                       [default: 102400 = 100K]

Job List Syntax:
  -j filename1=id1,id2:filename2=id3,id4

  filename           : Name of the output file
  id1,id2,...        : VTS_x_y.VOB files where the id is x

  E.g. -j outfile1=1,2,3:outfile2=4,5:outfile3=6

Job File Syntax:
  -f jobfilename

  E.g.
    outfile1=1,2,3
    outfile2=4,5
    outfile3=6</pre>
<p>The above goes into various concepts which are further explained below:-</p>
<p><u>Jobs</u></p>
<p>Jobs allow us to specify all the output videos that need to be encoded as well as associate the output videos with the input VOB files. They can be specified on the command line using <span style="font-family:monospace;">-j</span> or in a file using <span style="font-family:monospace;">-f</span>. One or two jobs look fine on the command line but if you have more, it might be easier to create a job file and pass it onto vobenc.py.</p>
<p>Jobs automate the task of merging VOB files as well as running through every step for each output video.</p>
<p><u>Steps</u></p>
<p>In my original solution, there were essentially three steps that each video went through. The first and second steps were the first and second pass encoding of the video for high quality archival. The third pass was to encode the downloadable version. These steps line up with the concept of steps in vobenc.py.</p>
<p>Below is the corresponding config.ini step file for what was proposed in the original solution. A downloadable version is further below.</p>
<pre>
[step1]
name = High Quality Pass 1
command = mencoder - -o nul -oac mp3lame -lameopts br=128:cbr:aq=0 -ovc xvid -xvidencopts bitrate=1150:vhq=4:pass=1 -msglevel all=5

[step2]
name = High Quality Pass 2
command = mencoder - -o <font color="red">#OUTFILE#</font>-hi.avi -oac mp3lame -lameopts br=128:cbr:aq=0 -ovc xvid -xvidencopts bitrate=1150:vhq=4:pass=2 -msglevel all=5

[step3]
name = Low Quality
command = mencoder - -o <font color="red">#OUTFILE#</font>-lo.mpg -oac lavc -srate 24000 -ovc lavc -lavcopts acodec=mp3:abitrate=24:vcodec=wmv2:vbitrate=96 -vf scale=264:180 -ofps 15 -msglevel all=1</pre>
<p>Using the above format, we could have any number of steps. Also note the <font color="red"><span style="font-family:monospace;">#OUTFILE#</span></font> directive that allows us to pass on the output file specified in the job to the encoding utility.</p>
<p>The way config.ini is laid out, we could pass the VOB input to any utility that would handle the VOB data from STDIN. In the above example, we are using <a href="http://www.mplayerhq.hu/" target="_blank">mencoder</a>. We could just as well use <a href="http://ffmpeg.mplayerhq.hu/" target="_blank">ffmpeg</a> or any other command line encoder we prefer.</p>
<p>Steps allow us to automate the various steps that each individual video needs to go through in order to produce the output files.</p>
<p><u>Buffer Size</u></p>
<p>Vobenc.py uses a default buffer size of 100K. This means that it attempts to read 100K of data from the DVD at a time. On a 1.4GB DVD containing 74 minutes of video, 100K is approximately 1/3rd of a second of information and is a fair compromise.</p>
<p>When a buffer read fails on the DVD, the entire buffer is skipped and the next buffer is read. This allows us to skip corrupt sections of the VOB without having to manually decide what to do.</p>
<p>If the buffer is too large, this will result in more data loss than required. On the other hand, a very small buffer size will affect read speed since smaller chunks will be skipped on corrupt VOBs leading to more IO errors and timeouts. As a result, the buffer size is changeable by the user depending on the state of the DVD. A DVD which is relatively error free could use a larger buffer size, speeding up the read whereas a DVD with a fair amount of damage could use a smaller buffer size to squeeze out as much information as is possible.</p>
<p>Note, however, that very large buffer sizes are not very useful since the main bottleneck is the actual encoding process. The encoder can only handle so many megs of data at a time.</p>
<p>Vobenc.py displays the amount of data loss per VOB at the end of the encoding process.</p>
<p><strong>Download</strong></p>
<p>Vobenc.py is being distributed as a Python script. You will need the <a href="http://www.python.org/">Python</a> interpreter installed on your system in order to run it.</p>
<ul>
<li>Vobenc 1.0: <a href="http://genotrance.com/code/vobenc/vobenc-1.0.py">vobenc.py</a> <a href="http://genotrance.com/code/vobenc/config.ini">config.ini</a></li>
</ul>
<p><strong>Summary</strong></p>
<p>I recently used vobenc.py to encode an entire 1.4GB DVD. It took an entire night to get through the encoding but the entire task was seamless and automated. All I had to do was create a job file and that took all of five minutes.</p>
<p>I&#8217;ll be maintaining vobenc.py on this blog post for now. Feel free to provide your feedback.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/genotrance.wordpress.com/67/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/genotrance.wordpress.com/67/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/genotrance.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/genotrance.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/genotrance.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/genotrance.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/genotrance.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/genotrance.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/genotrance.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/genotrance.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/genotrance.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/genotrance.wordpress.com/67/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=67&subd=genotrance&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://genotrance.wordpress.com/2007/02/16/automating-the-encoder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ff1c4e221d5132270aa4f03eeca16e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">genotrance</media:title>
		</media:content>
	</item>
		<item>
		<title>AppSnap reviewed on Lifehacker</title>
		<link>http://genotrance.wordpress.com/2006/12/20/appsnap-reviewed-on-lifehacker/</link>
		<comments>http://genotrance.wordpress.com/2006/12/20/appsnap-reviewed-on-lifehacker/#comments</comments>
		<pubDate>Wed, 20 Dec 2006 06:14:52 +0000</pubDate>
		<dc:creator>genotrance</dc:creator>
				<category><![CDATA[Blog Update]]></category>

		<guid isPermaLink="false">http://genotrance.wordpress.com/2006/12/20/appsnap-reviewed-on-lifehacker/</guid>
		<description><![CDATA[I just found out that AppSnap was reviewed on Lifehacker. My web server apparently took a beating and was down. Considering I was travelling for most of today, I just got to fixing it. Hopefully, it fares better now that I&#8217;ve tweaked some settings.
I&#8217;m a regular reader and fan of Lifehacker and am very happy [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=66&subd=genotrance&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I just found out that <a href="http://appsnap.genotrance.com/">AppSnap</a> was reviewed on <a href="http://www.lifehacker.com/software/installation/download-of-the-day-appsnap-windows-222460.php" target="_blank">Lifehacker</a>. My web server apparently took a beating and was down. Considering I was travelling for most of today, I just got to fixing it. Hopefully, it fares better now that I&#8217;ve tweaked some settings.</p>
<p>I&#8217;m a regular reader and fan of Lifehacker and am very happy to see AppSnap on their front page. Thanks to <a href="http://www.ginatrapani.org/" target="_blank">Gina Trapani</a> and the <a href="http://www.lifehacker.com/" target="_blank">Lifehacker</a> gang for their show of support. The extra eyes and feedback will surely help make AppSnap more useful to people out there.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/genotrance.wordpress.com/66/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/genotrance.wordpress.com/66/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/genotrance.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/genotrance.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/genotrance.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/genotrance.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/genotrance.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/genotrance.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/genotrance.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/genotrance.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/genotrance.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/genotrance.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=66&subd=genotrance&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://genotrance.wordpress.com/2006/12/20/appsnap-reviewed-on-lifehacker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ff1c4e221d5132270aa4f03eeca16e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">genotrance</media:title>
		</media:content>
	</item>
		<item>
		<title>Unreasonable Firefox memory usage</title>
		<link>http://genotrance.wordpress.com/2006/12/17/unreasonable-firefox-memory-usage/</link>
		<comments>http://genotrance.wordpress.com/2006/12/17/unreasonable-firefox-memory-usage/#comments</comments>
		<pubDate>Sun, 17 Dec 2006 09:19:52 +0000</pubDate>
		<dc:creator>genotrance</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://genotrance.wordpress.com/2006/12/17/unreasonable-firefox-memory-usage/</guid>
		<description><![CDATA[I upgraded to Firefox 2.0 recently and was impressed like most other folks. Things were fine until I started noticing excessive hard disk activity as well as sluggish performance and intermittant hangs.

Task Manager showed Firefox using ridiculous amounts of memory, more than 300MB with several open tabs in multiple windows. Considering my wife and I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=65&subd=genotrance&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I upgraded to Firefox 2.0 recently and was impressed like most other folks. Things were fine until I started noticing excessive hard disk activity as well as sluggish performance and intermittant hangs.</p>
<p><span id="more-65"></span></p>
<p>Task Manager showed Firefox using ridiculous amounts of memory, more than 300MB with several open tabs in multiple windows. Considering my wife and I use separate windows for our work, quitting and restarting every day is not convenient since Firefox only restores the session of the window that was closed last.</p>
<p>A few searches on Google led to the following <a href="http://kb.mozillazine.org/Problematic_extensions" target="_blank">page</a> on the Mozillazine knowledge base; basically, a list of add-ons known to cause all sorts of trouble for Firefox. Comparing my list of installed add-ons with the page led to the following short list of potential culprits:-</p>
<ul>
<li><a href="http://toolbar.google.com/firefox/index.html" target="_blank">Official Google Toolbar</a> : causes memory leaks and excessive disk activity</li>
<li><a href="https://addons.mozilla.org/extensions/moreinfo.php?id=1419" target="_blank">IE Tab</a> : leaks memory</li>
</ul>
<p>I was only using Google Toolbar to auto-fill my forms so it wasn&#8217;t hard to uninstall it. As for IE Tab, I installed the recommended alternative <a href="https://addons.mozilla.org/firefox/1429/" target="_blank">IE View Lite</a> which is a sufficient solution. Having IE embedded into Firefox is a nice to have but not essential.</p>
<p>From that point on, Firefox memory usage has stayed under 100MB for the most part. After several days of usage spanning multiple tabs, windows and websites, it gets to 140MB which is pretty reasonable compared to the original 300MB.</p>
<p>Here&#8217;s what my add-on list looks like now:</p>
<p><a href="http://www.flickr.com/photos/92701872@N00/1340679652/" title="Firefox Addons"><img src="http://farm2.static.flickr.com/1312/1340679652_cf01dd1d89_o.jpg" width="422" height="493" alt="firefox_addons" /></a></p>
<p>There&#8217;s more tips for reducing memory on <a href="http://kb.mozillazine.org/Reducing_memory_usage_(Firefox)" target="_blank">this Mozillazine page</a> if you are interested in further improvements.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/genotrance.wordpress.com/65/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/genotrance.wordpress.com/65/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/genotrance.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/genotrance.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/genotrance.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/genotrance.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/genotrance.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/genotrance.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/genotrance.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/genotrance.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/genotrance.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/genotrance.wordpress.com/65/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=65&subd=genotrance&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://genotrance.wordpress.com/2006/12/17/unreasonable-firefox-memory-usage/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ff1c4e221d5132270aa4f03eeca16e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">genotrance</media:title>
		</media:content>

		<media:content url="http://farm2.static.flickr.com/1312/1340679652_cf01dd1d89_o.jpg" medium="image">
			<media:title type="html">firefox_addons</media:title>
		</media:content>
	</item>
		<item>
		<title>Session cookies rejected by Internet Explorer</title>
		<link>http://genotrance.wordpress.com/2006/11/23/session-cookies-rejected-by-internet-explorer/</link>
		<comments>http://genotrance.wordpress.com/2006/11/23/session-cookies-rejected-by-internet-explorer/#comments</comments>
		<pubDate>Thu, 23 Nov 2006 19:55:16 +0000</pubDate>
		<dc:creator>genotrance</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://genotrance.wordpress.com/2006/11/23/session-cookies-rejected-by-internet-explorer/</guid>
		<description><![CDATA[Recently, I ran into a problem with an image gallery web application I am writing in PHP. Throughout development, which&#160;was done on my Windows&#160;laptop using XAMPP, everything worked perfectly fine, both on Firefox as well as Internet Explorer. 
As soon as I deployed my application on my Linux server, IE suddenly stopped accepting my session [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=64&subd=genotrance&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Recently, I ran into a problem with an image gallery web application I am writing in <a href="http://www.php.net/" target="_blank">PHP</a>. Throughout development, which&nbsp;was done on my Windows&nbsp;laptop using <a href="http://www.apachefriends.org/en/xampp-windows.html" target="_blank">XAMPP</a>, everything worked perfectly fine, both on <a href="http://www.getfirefox.com/" target="_blank">Firefox</a> as well as <a href="http://www.microsoft.com/windows/ie/" target="_blank">Internet Explorer</a>. </p>
<p>As soon as I deployed my application on my Linux server, IE suddenly stopped accepting my session cookies. The weird thing was that Firefox continued to work perfectly fine.</p>
<p><span id="more-64"></span>
<p><strong>Symptoms</strong></p>
<p>My application makes multiple <a href="http://en.wikipedia.org/wiki/AJAX" target="_blank">AJAX</a>&nbsp;requests to render each page. Usually, a single session would get created and each subsequent request would reuse that session. Instead, each request was creating a new session. My application didn&#8217;t work at all since session variables were no longer accessible. On the server side, the PHP session directory was getting flooded with session files.</p>
<p>I didn&#8217;t see any cookies for my application in&nbsp;IE&#8217;s cache directory. For every request that IE was making, PHP was creating a new session and&nbsp;IE was rejecting the session cookie returned. Hence, there was no session cookie to send back to the server for the next request and PHP was assigning a new session for each request.</p>
<p>Considering everything worked fine on Firefox but not on IE, one would think it was some bug in my application. But it worked fine in IE when running on the Windows laptop. So there was probably nothing wrong with my application.</p>
<p><strong>Possible Solutions</strong></p>
<p>Google turned up a couple relevant results after a lot of searching. Here&#8217;s what I found:-</p>
<p><u>P3P issue</u></p>
<p>As per <a href="http://www.aspnetresources.com/blog/frames_webforms_and_rejected_cookies.aspx" target="_blank">this website</a>, IE 6 had a new feature that would reject sessions in certain circumstances&nbsp;unless a specific header was sent clarifying the intentions of the web appliction. This seemed probable so I gave it a try. </p>
<p>I added the following to the top of my application so that every call would return this HTTP header:-</p>
<p>
<div style="margin-left:40px;"><code>header('P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');</code></div>
<p><span> </span>
</p>
<p>It didn&#8217;t work so it was something else.</p>
<p><u>Session IDs transported by URL</u></p>
<p><a href="http://www.thescripts.com/forum/thread2224.html" target="_blank">This website</a> claimed that the latest IE update increased the security levels and that applications had no choice but to hard code the session IDs in the URLs.&nbsp;This can be done by enabling&nbsp;the following option in php.ini:-</p>
<p>
<div style="margin-left:40px;"><code>session.use_trans_sid = 1</code></div>
<p><span> </span>
</p>
<p>Of course, this meant that every URL needed to have the session ID added to it. It didn&#8217;t feel like the right option since Microsoft wouldn&#8217;t break web applications so badly. Considering how many URLs each application has and how many applications are out there, it would be prohibitive to have to change them all to include a session ID.</p>
<p><u>Timezone issue</u></p>
<p><a href="http://www.mambers.com/showthread-t_4685.html" target="_blank">A third website</a>&nbsp;suggested that IE was calculating session cookie timeouts incorrectly such that they seemed to expire in the past. As a result, these already expired cookies were rejected immediately. For example, if the server was in Hawaii and the client in Australia and the server requested a session timeout of one hour, the timeout would have already occurred as far as the client in Australia was concerned.</p>
<p>Firefox didn&#8217;t have this issue since it converts both the server as well as the client time to UTC and then calculates the timeout. As interesting as this was, this didn&#8217;t seem as the problem since both my laptop client as well as my server were in the same timezone.</p>
<p><strong>Final Solution</strong></p>
<p>The timezone issue did give me a hint to check the time on my client and server. My client is a Windows laptop which had the correct time and timezone thanks to being synchronized with the NTP protocol. My server on the other hand was out of sync. </p>
<p>The timezone was correct, but the UTC time was set to my local time instead. As a result, the server was actually six hours in the past as far as the client was concerned.&nbsp;A timeout of one hour would have expired in the past for an IE instance running on my client. No wonder IE was rejecting my sessions.</p>
<p>I ran <em>ntpdate</em> to fix my time and then reset my timezone using <em>tzselect</em>.</p>
<p>
<div style="margin-left:40px;"><code># ntpdate pool.ntp.org<br /># tzselect</code></div>
<p><span> </span>
</p>
<p>I then refreshed&nbsp;IE which&nbsp;immediately started accepting the sessions. All aspects of my application started working correctly. So much for so little.</p>
<p>Moral of the story, use NTP to ensure that your machines have their time set correctly.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/genotrance.wordpress.com/64/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/genotrance.wordpress.com/64/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/genotrance.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/genotrance.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/genotrance.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/genotrance.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/genotrance.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/genotrance.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/genotrance.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/genotrance.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/genotrance.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/genotrance.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=64&subd=genotrance&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://genotrance.wordpress.com/2006/11/23/session-cookies-rejected-by-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ff1c4e221d5132270aa4f03eeca16e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">genotrance</media:title>
		</media:content>
	</item>
		<item>
		<title>Py2Exe: Zlib not available</title>
		<link>http://genotrance.wordpress.com/2006/10/05/py2exe-zlib-not-available/</link>
		<comments>http://genotrance.wordpress.com/2006/10/05/py2exe-zlib-not-available/#comments</comments>
		<pubDate>Thu, 05 Oct 2006 05:02:50 +0000</pubDate>
		<dc:creator>genotrance</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://genotrance.wordpress.com/2006/10/05/py2exe-zlib-not-available/</guid>
		<description><![CDATA[Recently, I released ClearAxis, a simple application that allows you to configure the Araxis Merge utility as the default diff tool within Rational ClearCase. The ClearCase diff tool is rather primitive and could really use some replacing.

ClearAxis is written in Python and is packaged using Py2Exe so that any end user could run it without [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=63&subd=genotrance&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Recently, I released <a href="/applications/clearaxis/">ClearAxis</a>, a simple application that allows you to configure the <a href="http://araxis.com/merge/index.html" target="_blank">Araxis Merge</a> utility as the default diff tool within <a href="http://en.wikipedia.org/wiki/Rational_ClearCase" target="_blank">Rational ClearCase</a>. The ClearCase diff tool is rather primitive and could really use some replacing.</p>
<p><span id="more-63"></span></p>
<p>ClearAxis is written in <a href="http://www.python.org" target="_blank">Python</a> and is packaged using <a href="http://www.py2exe.org" target="_blank">Py2Exe</a> so that any end user could run it without having to install Python. More importantly, ClearCase can only invoke executables from it&#8217;s map file and running <em>python.exe</em> with command line arguments does not work. As a result, ClearAxis had to be a standalone executable.</p>
<p>While developing ClearAxis, I ran into a problem with Py2Exe that I had encountered earlier with <a href="/applications/clump/">Clump</a> as well. If you run the generated <em>.exe</em> from the directory it is located in, everything works fine. If you specify the full path to the <em>.exe</em> on the command line, that works too. However, when ClearAxis was executed through the ClearCase map file, you&#8217;d get the following error in the <em>.exe.log</em> file:</p>
<p style="margin-left:40px;"><span style="font-family:monospace;">Traceback (most recent call last):<br />
File &#8220;clearaxis.py&#8221;, line 1, in ?<br />
zipimport.ZipImportError: can&#8217;t decompress data; zlib not available</span></p>
<p>With Clump, this error occurred when I added the Clump directory to the system path and tried running <em>clump.exe</em> from any directory. Working around this for Clump wasn&#8217;t a huge problem. I created a batch file in the <em>Windows </em>directory which resolved the full path the to <em>.exe</em>. So I didn&#8217;t need to add Clump to the system path, nor did I need to figure out this Zlib problem.</p>
<p>With ClearAxis, this workaround wasn&#8217;t viable. I searched the web for several hours, looking for solutions to this issue before I gave up and began scavenging the Py2Exe code instead. There&#8217;s multiple solutions for this issue using combinations of Py2Exe <em>setup flags</em>. The choice is between the size of the resulting application versus the number of files in the application directory. It also depends on how many executables are to be compiled by Py2Exe for your application.</p>
<p><strong>Py2Exe Default</strong></p>
<p>Just as reference, here&#8217;s the default settings in Py2Exe as a baseline. It is a good option if you run your application by resolving it&#8217;s full path like in a shortcut or batch file.</p>
<p style="margin-left:40px;"><span style="font-family:monospace;">zipfile = &#8220;shared.lib&#8221;<br />
compressed = 0</span></p>
<p>If the <em>.exe </em>path is not fully resolved, the Zlib error occurs.</p>
<p><strong>Method 1</strong></p>
<p>In this method, the Python libraries and required DLLs are compressed and bundled into the <em>.exe</em> itself. Since Zlib is bundled into the <em>.exe</em>, we can now decompress the libraries and the Zlib error goes away.</p>
<p style="margin-left:40px;"><span style="font-family:monospace;">zipfile = None<br />
compressed = 1<br />
bundle_files = 2</span></p>
<p>This approach works well for an application with a single executable. For an application with multiple executables, this method increases the total size considerably since none of the common Python libraries and DLLs are shared. Instead, they are redundantly packaged into each executable.</p>
<p><strong>Method 2</strong></p>
<p>In this method, only the Python libraries are bundled into the executable. We can&#8217;t turn on compression since the Zlib DLL is not bundled. If we turn on compression, the Zlib error comes back since the libraries still need to be decompressed and Zlib can not be found.</p>
<p style="margin-left:40px;"><span style="font-family:monospace;">zipfile = None<br />
compressed = 0</span></p>
<p>Like <em>Method 1</em>, this approach also increases the total size if multiple executables need to be compiled, though not as much since the DLLs are still shared.</p>
<p><strong>Method 3</strong></p>
<p>In this method, all the Python libraries and the required DLLs are stored on the file system without any compression or packaging. As a result, no decompression needs to be performed and our Zlib error goes away.</p>
<p style="margin-left:40px;"><span style="font-family:monospace;">zipfile = &#8220;shared.lib&#8221;<br />
compressed = 0<br />
skip_archive = 1</span></p>
<p>The issue with this approach is that we end up with more than 200 files spread across more than 15 directories in the resulting application. Not too pretty.</p>
<p><strong>Comparison</strong></p>
<p>The above methods provide different results as far as file size and directory structure are concerned. Here&#8217;s what it looks like for Clump which has a single executable. As you can see, <em>Method 1</em> gives the best bang for the buck.</p>
<table border="1" width="400">
<tr>
<th align="center">Method</th>
<th align="center">Size</th>
<th align="center">Files</th>
</tr>
<tr>
<td align="center">Default</td>
<td align="center">4,299,454</td>
<td align="center">15 files</td>
</tr>
<tr>
<td align="center">1</td>
<td align="center">4,202,393</td>
<td align="center">5 files</td>
</tr>
<tr>
<td align="center">2</td>
<td align="center">5,560,562</td>
<td align="center">15 files</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">5,542,032</td>
<td align="center">&gt; 200 files</td>
</tr>
</table>
<p>As for AppSnap which has two executables, one for the console and one for the GUI, the results are more interesting. Do you choose size or a clean directory structure?</p>
<table border="1" width="400">
<tr>
<th align="center">Method</th>
<th align="center">Size</th>
<th align="center">Files</th>
</tr>
<tr>
<td align="center">Default</td>
<td align="center">5,051,330</td>
<td align="center">21 files</td>
</tr>
<tr>
<td align="center">1</td>
<td align="center">9,106,298</td>
<td align="center">9 files</td>
</tr>
<tr>
<td align="center">2</td>
<td align="center">8,796,440</td>
<td align="center">21 files</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">6,584,139</td>
<td align="center">&gt; 200 files</td>
</tr>
</table>
<p><strong>Note</strong>: All sizes above are calculated after compressing all executables and DLLs with <a href="http://www.upx.org/" target="_blank">UPX</a> and recompressing <em>shared.lib</em> with <a href="http://www.7-zip.org/" target="_blank">7Zip</a> at the maximum level. Check out the Py2Exe <a href="http://www.py2exe.org/index.cgi/BetterCompression" target="_blank">wiki</a> under the 7Zip and UPX section for more information.</p>
<p><strong>Conclusion</strong></p>
<p>If you have one executable in your application, <em>Method 1</em> seems to be the best option. For two to three executables, <em>Method 2 </em>seems to be a decent middle ground. For more than four executables, <em>Method 3</em> is the most sensible since the redundancy is no longer justified. And all this only if you expect to run your application from a directory other than it&#8217;s own on the command line. Otherwise, the Py2Exe default gives us very acceptable results.</p>
<p>Which method to choose greatly depends on your application&#8217;s requirements. ClearAxis uses <em>Method 2 </em>for now but probably will move to <em>Method 1</em> in the next release to avail the improved total size. As for AppSnap, I don&#8217;t care about executing it from a directory other than it&#8217;s own so it is using the default method for now.</p>
<p>Take a pick. At least there&#8217;s a solution.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/genotrance.wordpress.com/63/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/genotrance.wordpress.com/63/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/genotrance.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/genotrance.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/genotrance.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/genotrance.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/genotrance.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/genotrance.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/genotrance.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/genotrance.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/genotrance.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/genotrance.wordpress.com/63/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=genotrance.wordpress.com&blog=1658476&post=63&subd=genotrance&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://genotrance.wordpress.com/2006/10/05/py2exe-zlib-not-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ff1c4e221d5132270aa4f03eeca16e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">genotrance</media:title>
		</media:content>
	</item>
	</channel>
</rss>