<?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"
	>

<channel>
	<title>furmanek.net</title>
	<atom:link href="http://www.furmanek.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.furmanek.net</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Fri, 21 Nov 2008 02:56:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>FitTimer - staying fit and having time for other things.</title>
		<link>http://www.furmanek.net/49/fittimer-in-appstore/</link>
		<comments>http://www.furmanek.net/49/fittimer-in-appstore/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 02:56:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[iPhone]]></category>

		<category><![CDATA[Applicaton]]></category>

		<category><![CDATA[fit timer]]></category>

		<guid isPermaLink="false">http://www.furmanek.net/?p=49</guid>
		<description><![CDATA[I like working out, but I like a lot of things and working out usually does not make my priority list as much these days.  I used to spend a lot of time in a gym.  By &#8220;a lot of time&#8221; I really mean a lot of time.  Some weeks I must [...]]]></description>
			<content:encoded><![CDATA[<p>I like working out, but I like a lot of things and working out usually does not make my priority list as much these days.  I used to spend a lot of time in a gym.  By &#8220;a lot of time&#8221; I really mean <strong>a lot of time</strong>.  Some weeks I must have spend as many as 20 hours in the gym.  I was really fit but I had absolutely no time for other things.</p>
<p>I have started to wonder why my workouts are taking so much of my time.  What in those workouts take the time and if there is a way to workout as hard but in less time.  I bought a stopwatch and started measuring where the time was going.  As you may expect it was not going into working out.  Most of my time was spent on breaks.  Breaks could take up as much as 90% of my time in the gym.</p>
<p>90% seems like a lot of time, so I have stated to experiment with different break times and I have noticed that I did not need to take such long breaks.  For most exercises a 45 second break was adequate where others were ok at 60 seconds.  Needless to say stopwatch became a necessary accessory at the gym.  Yes one more thing to carry while I work out.</p>
<p>And then &#8230; Apple came out with the iPhone.  Thanks, Apple.  It is the device that has replaced 3 items I used to carry with me at the gym.  The phone, an iPod and the stopwatch.</p>
<p>I have written FitTimer to be the way to keep track of my breaks.  Simplicity and nice design where the top priorities during the design process.</p>
<p>It had to be simpler then a stopwatch. After all no one want&#8217;s to struggle with a program while they are working out.  Your focus should be always on working out and not on operating a device.  Tracking your workout should be almost incidental and not the primary goal of working out.</p>
<p>It had to look good.  As one of the &#8220;gym rats&#8221; I know full well that we are somewhat vain.  OK, some of us are really vain, but I am talking about the average &#8220;gym rat.&#8221;  We go to the gym to look good.  Why would we have an app in the gym that makes us look worse?  Well, we would not.</p>
<p>So here is what I came up with:</p>
<div style="float:left;clear:both;width:100%">
<a href="http://www.furmanek.net/wp-content/uploads/2008/11/main_interface_paused.jpg"><img class="alignleft size-full wp-image-50" title="main_interface_paused" src="http://www.furmanek.net/wp-content/uploads/2008/11/main_interface_paused.jpg" alt="" width="160" height="230" /></a><a href="http://www.furmanek.net/wp-content/uploads/2008/11/timer_settings.jpg"><img class="alignleft size-full wp-image-53" title="timer_settings" src="http://www.furmanek.net/wp-content/uploads/2008/11/timer_settings.jpg" alt="" width="160" height="230" /></a><a href="http://www.furmanek.net/wp-content/uploads/2008/11/main_interface.png"><img class="alignleft size-full wp-image-52" title="main_interface" src="http://www.furmanek.net/wp-content/uploads/2008/11/main_interface.png" alt="" width="160" height="230" /></a>
</div>
</p>
<p>Simple, functional and elegant.</p>
<p>Now I can fit my workouts in under an hour.  That&#8217;s 2 hours I save every day.</p>
<p>I bet if you work out and not measuring your times you are wasting your time just I use to so if you have an iPhone or an iPod touch you can get the app at the apple AppStore: <a title="FitTimer" href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=297099808&amp;mt=8">FitTimer</a></p>
<p>You can also see more screen shot on our company website: <a href="http://eideticsoftware.com/fittimer">http://eideticsoftware.com/fittimer</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.furmanek.net/49/fittimer-in-appstore/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Rails, tests and code coverage</title>
		<link>http://www.furmanek.net/48/rails-testing-code-coverage/</link>
		<comments>http://www.furmanek.net/48/rails-testing-code-coverage/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 16:50:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Ruby]]></category>

		<category><![CDATA[testing]]></category>

		<category><![CDATA[code coverage]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[rake]]></category>

		<category><![CDATA[rcov]]></category>

		<guid isPermaLink="false">http://www.furmanek.net/?p=48</guid>
		<description><![CDATA[&#8220;If it&#8217;s not tested assume it&#8217;s broken.&#8221;  This is one of the mantras in my company.  Sometimes it&#8217;s easier said then done.  If I always had to test everything I would be doing nothing but testing.  So I employ different techniques to keep me programming and the computer to test the [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;If it&#8217;s not tested assume it&#8217;s broken.&#8221;  This is one of the mantras in my company.  Sometimes it&#8217;s easier said then done.  If I always had to test everything I would be doing nothing but testing.  So I employ different techniques to keep me programming and the computer to test the code I write.</p>
<p>One of the nice things about Rails is that you have a whole array of tools to automate testing and at least one very nice tool to let you know what&#8217;s tested and what&#8217;s not.  Yes I am talking about Rcov.</p>
<p>Rcov has been &#8220;the bee&#8217;s knees&#8221; for code coverage awareness.  Recently I have noticed Rcov has been doing more work then expected.  When I ran the rcov command in a rails project it tested everything.  I mean everything, including gems installed on the system.</p>
<p>Since everything is just a bit too much for my project I started looking for a way to limit the output. It appears I had to use -x option to stop the code coverage tool from traversing the gems.  Here is the whole task:</p>
<pre>
desc 'Measures test coverage using rcov'
Rcov::RcovTask.new(:rcov) do |rcov|
  rcov.pattern    = "test/**/*_test.rb"
  rcov.rcov_opts  = [
    "-x 'gems/.*,rubygems/.*,rcov/.*'",
    "-T",
    "--rails" ]
  rcov.output_dir = &#8220;rcov/unified&#8221;
end
</pre>
<p>I hope this helps you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.furmanek.net/48/rails-testing-code-coverage/feed/</wfw:commentRss>
		</item>
		<item>
		<title>iChessClock in the Apple AppStore</title>
		<link>http://www.furmanek.net/46/ichessclock-in-the-apple-appstore/</link>
		<comments>http://www.furmanek.net/46/ichessclock-in-the-apple-appstore/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 01:22:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[AppStore]]></category>

		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Chess]]></category>

		<category><![CDATA[chess clock]]></category>

		<category><![CDATA[clock]]></category>

		<category><![CDATA[iChessClock]]></category>

		<guid isPermaLink="false">http://www.furmanek.net/?p=46</guid>
		<description><![CDATA[Brent and I finally were able to submit our first iPhone application.  It&#8217;s a simple yet elegant chess clock that can satisfy most of the chess matches out there.
Eidetic Software&#8217;s Website:  http://www.eideticsoftware.com
The iChessClock is available at the Apple AppStore
]]></description>
			<content:encoded><![CDATA[<p><a style="float:left;" href='http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=293540176&#038;mt=8'><img src="http://www.furmanek.net/wp-content/uploads/2008/10/ichessclock_logo.png" alt="" title="ichessclock" width="156" height="155" class="alignleft size-medium wp-image-47" /></a>Brent and I finally were able to submit our first iPhone application.  It&#8217;s a simple yet elegant chess clock that can satisfy most of the chess matches out there.</p>
<p><a href="http://www.eideticsoftware.com">Eidetic Software&#8217;s Website: <br/> http://www.eideticsoftware.com</a></p>
<p>The iChessClock is available at <a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=293540176&#038;mt=8">the Apple AppStore</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.furmanek.net/46/ichessclock-in-the-apple-appstore/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Removing git-svn remote branch</title>
		<link>http://www.furmanek.net/45/removing-git-svn-remote-branch/</link>
		<comments>http://www.furmanek.net/45/removing-git-svn-remote-branch/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 17:28:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[git]]></category>

		<category><![CDATA[deleting branches]]></category>

		<category><![CDATA[git-svn]]></category>

		<guid isPermaLink="false">http://www.furmanek.net/?p=45</guid>
		<description><![CDATA[I could not find a reference how to remove a remote branch that is connected to an SVN repository so I have tried this:

$git branch -r -d my-remote-branch

This seemed to work well.
]]></description>
			<content:encoded><![CDATA[<p>I could not find a reference how to remove a remote branch that is connected to an SVN repository so I have tried this:<br />
<code><br />
$git branch -r -d my-remote-branch<br />
</code></p>
<p>This seemed to work well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.furmanek.net/45/removing-git-svn-remote-branch/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Unix prompt (PS1) with git branch name</title>
		<link>http://www.furmanek.net/39/unix-prompt-for-usage-with-git/</link>
		<comments>http://www.furmanek.net/39/unix-prompt-for-usage-with-git/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 14:00:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Bash]]></category>

		<category><![CDATA[Development]]></category>

		<category><![CDATA[Introductions]]></category>

		<category><![CDATA[Unix]]></category>

		<category><![CDATA[git]]></category>

		<category><![CDATA[PS1]]></category>

		<guid isPermaLink="false">http://www.furmanek.net/?p=39</guid>
		<description><![CDATA[Working with Git I noticed that I change branches quite a lot.  This is a good thing but sometimes I am in the incorrect branch when I check things in.  I needed a warning system especially when I check things into remote SVN repository.  Since most of my check-ins are done from [...]]]></description>
			<content:encoded><![CDATA[<p>Working with Git I noticed that I change branches quite a lot.  This is a good thing but sometimes I am in the incorrect branch when I check things in.  I needed a warning system especially when I check things into remote SVN repository.  Since most of my check-ins are done from the command line it would be nice to know what branch I am on just by looking at the screen.  Fortunately there is neat way to add the branch information to the Unix prompt.  You can do that by overriding the PS1 variable for example:</p>
<pre>
export PS1="[\D{%Y-%m-%d} \t] \w \n$&#8221;
</pre>
<p>would generate</p>
<pre>
[2008-07-12 12:00:00] /foo/bar
$
</pre>
<p>if I am in the <code>/foo/bar</code> directory.</p>
<p>So at this point I would like the prompt to look like:</p>
<pre>
[2008-07-12 12:00:00] /foo/bar <span style="color:green;">[master]</span>
$
</pre>
<p>when I am in a master branch and prompt:</p>
<pre>
[2008-07-12 12:00:00] /foo/bar <span style="color:red;">[experimental]</span>
$
</pre>
<p>when I am in any other branch.</p>
<p>Here are the steps to get this working:<br />
Prerequisites:<br />
- ruby interpreter<br />
- git</p>
<p>Steps:</p>
<ol>
<li> Create a git-ps.rb file
<pre>
green = "\033[0;32m"
white = "\033[0;37m"
red   = "\033[0;31m"
current_branch = `git branch 2>/dev/null`.grep(/^\*/).first
if current_branch
  branch_name = current_branch.gsub(/^\*\s*/,'').strip
  color = branch_name  =~ /master/ ? green : red
  unless current_branch.empty?
    puts "  #{color}[#{branch_name}]#{white}&#8221;
  end
end
</pre>
</li>
<li> create .ps file in your home directory:
<pre>
parse_git_branch() {
  ruby ~/git-ps.rb 2>/dev/null
}
export PS1="[\D{%Y-%m-%d} \t] \w\$(parse_git_branch) \n$ &#8221;
</pre>
</li>
<li>Include the .ps file in your .bashrc and .bash_profile by inserting following line:
<pre>
. ~/.ps
</pre>
</li>
</ol>
<p>To activate the new prompt in your current execute command:<br />
. ~/.ps</p>
<p>I hope this helps.</p>
<hr/>
<p style="font-weight:bold">References</p>
<p>Ref: <a href="http://wiki.archlinux.org/index.php/Color_Bash_Prompt">Prompt Creation</a><br />
Ref: <a href="http://unboundimagination.com/Current-Git-Branch-in-Bash-Prompt">Git and Bash prompt</a><br />
Ref: <a href="http://blog.ericgoodwin.com/2008/4/10/auto-completion-with-git">__git_ps1</a></p>
<hr/>
<p style="font-weight:bold">Downloads</p>
<p><a href='http://www.furmanek.net/wp-content/uploads/2008/07/colored_branch_name.tgz'>colored_branch_name</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.furmanek.net/39/unix-prompt-for-usage-with-git/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Chess quote of the day</title>
		<link>http://www.furmanek.net/38/chess-quote-of-the-day/</link>
		<comments>http://www.furmanek.net/38/chess-quote-of-the-day/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 03:42:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Chess]]></category>

		<category><![CDATA[Quote]]></category>

		<guid isPermaLink="false">http://www.furmanek.net/?p=38</guid>
		<description><![CDATA[&#8220;I would do just fine if I could get you to keep your pieces still.&#8221;
- Scott
]]></description>
			<content:encoded><![CDATA[<p>&#8220;I would do just fine if I could get you to keep your pieces still.&#8221;<br />
- Scott</p>
]]></content:encoded>
			<wfw:commentRss>http://www.furmanek.net/38/chess-quote-of-the-day/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Gaussian Rounding in Ruby</title>
		<link>http://www.furmanek.net/37/gaussian-rounding-in-ruby/</link>
		<comments>http://www.furmanek.net/37/gaussian-rounding-in-ruby/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 23:09:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Ruby]]></category>

		<category><![CDATA[banker's rounding]]></category>

		<category><![CDATA[gaussian rounding]]></category>

		<guid isPermaLink="false">http://www.furmanek.net/?p=37</guid>
		<description><![CDATA[While working on a research tool for my work I have noticed that my ruby solution rounds differently then the original c# .net code.  It was not in every but about 10 percent of my tests failed due to the different rounding schemes.  
Ruby uses the Symmetric Arithmetic Rounding while C# .net uses [...]]]></description>
			<content:encoded><![CDATA[<p>While working on a research tool for my work I have noticed that my ruby solution rounds differently then the original c# .net code.  It was not in every but about 10 percent of my tests failed due to the different rounding schemes.  </p>
<p>Ruby uses the <em>Symmetric Arithmetic Rounding</em> while C# .net uses the <em>Gaussian rounding</em> otherwise known as the <em>Banker&#8217;s routing</em>.</p>
<p>I have looked for a quick solution for Ruby but Google did not return a result I could immediately use.  I have found a javascript solution which I translated to Ruby.</p>
<p>Additionally I have added a &#8220;decimal&#8221; parameter to specify the precision of rounding.</p>
<p>Here is the code:  </p>
<pre>
class Numeric
  def _round(val)
    sign = val < 0 ? -1 : 1
    return (val.abs.round * sign) if (val.abs - val.abs.floor) != 0.5
    return (val.abs.ceil  * sign) if val.abs.floor % 2 == 1
    return (val.abs.floor * sign)
  end

  def gaussian_round(decimals = 0)
    return (_round(self * (10**decimals))/((10**decimals).to_f))
  end
end
</pre>
<hr/>
Ref: <a href="http://snippets.dzone.com/posts/show/1305">Javascript Gaussian Rounding Example</a><br />
Ref: <a href="http://en.wikipedia.org/wiki/Rounding">Wikipedia article on rounding</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.furmanek.net/37/gaussian-rounding-in-ruby/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using MacRuby to set Xcode project version from git</title>
		<link>http://www.furmanek.net/36/using-macruby-to-set-xcode-project-version-from-git/</link>
		<comments>http://www.furmanek.net/36/using-macruby-to-set-xcode-project-version-from-git/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 08:29:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Development]]></category>

		<category><![CDATA[Ruby]]></category>

		<category><![CDATA[Xcode]]></category>

		<category><![CDATA[cocoa]]></category>

		<category><![CDATA[git]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[macruby]]></category>

		<guid isPermaLink="false">http://www.furmanek.net/?p=36</guid>
		<description><![CDATA[I have been looking into automating some of my development tasks in Cocoa/Xcode environment.  For the longest time I was using Subversion which would integrate quite well with Xcode. Recently, however, I have been exploring other version control systems.  Especially git.  Since it&#8217;s a much newer (D)VCS it does not have as much integration into [...]]]></description>
			<content:encoded><![CDATA[<p>I have been looking into automating some of my development tasks in Cocoa/Xcode environment.  For the longest time I was using Subversion which would integrate quite well with Xcode. Recently, however, I have been exploring other version control systems.  Especially git.  Since it&#8217;s a much newer (D)VCS it does not have as much integration into systems as subversion.</p>
<p>I have managed to find some interesting solutions to include Git version number in Xcode project however the only actual solutions I have found are written in languages I don&#8217;t care for anymore.  Yes I can program in them but why would I want to.</p>
<p>So here is a quick solution written in MacRuby.</p>
<pre style="font-size: 0.9em">#!/usr/local/bin/macruby

git_output = `git show --abbrev-commit`
commit_version = git_output.split("\n").grep(/^commit/).first
version = commit_version.gsub(/^commit\s+(.*)\.{3}/, "\\1")
if version
  list = NSMutableDictionary.dictionaryWithContentsOfFile("Info.plist")
  list["CFBundleVersion"] = version
  list.writeToFile(&#8217;Info.plist&#8217;, :atomically =&gt; true)
end</pre>
<p>In my final solution I intend to have an output in following format:</p>
<pre>major.minor.revision (build)</pre>
<p>where the &#8220;build&#8221; is going to correspond with the git commit version<br />
and the other parts will reflect the marketing version numbers.</p>
<hr/>
Ref: <a title="Shiny Frog Article on Integrating git and Xcode" href="http://www.shinyfrog.net/en/sync-svn-version-and-cfbundleversion-in-xcode">Shiny Frog Article</a> Python solution<br />
Ref: <a href="http://www.cimgf.com/2008/04/13/git-and-xcode-a-git-build-number-script/">Cocoa is my Girlfriend Article</a> Perl solution</p>
]]></content:encoded>
			<wfw:commentRss>http://www.furmanek.net/36/using-macruby-to-set-xcode-project-version-from-git/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Motto of the Day</title>
		<link>http://www.furmanek.net/35/motto-of-the-day/</link>
		<comments>http://www.furmanek.net/35/motto-of-the-day/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 04:53:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Quote]]></category>

		<category><![CDATA[quotes]]></category>

		<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://www.furmanek.net/?p=35</guid>
		<description><![CDATA[&#8220;If you don&#8217;t know where to start, start from writing tests.&#8221;
]]></description>
			<content:encoded><![CDATA[<p>&#8220;If you don&#8217;t know where to start, start from writing tests.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.furmanek.net/35/motto-of-the-day/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Quick rename of menu items in XCode</title>
		<link>http://www.furmanek.net/34/quick-rename-of-menu-items-in-xcode/</link>
		<comments>http://www.furmanek.net/34/quick-rename-of-menu-items-in-xcode/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 01:00:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Xcode]]></category>

		<category><![CDATA[cocoa]]></category>

		<category><![CDATA[menu items]]></category>

		<guid isPermaLink="false">http://www.furmanek.net/?p=34</guid>
		<description><![CDATA[Sometimes a little bit of automation goes a long way and other times it may be just wasted time.  I have run into one of these situations recently when dealing with Xcode and trying to rename menu items from NewApplication to the Application Name.
For Example:
Quit NewApplication -&#62; Quit TestApp
My first approach was to use [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes a little bit of automation goes a long way and other times it may be just wasted time.  I have run into one of these situations recently when dealing with Xcode and trying to rename menu items from NewApplication to the Application Name.</p>
<p>For Example:</p>
<p>Quit NewApplication -&gt; Quit TestApp</p>
<p>My first approach was to use Ruby open the MainMenu.xib and do a replacement.  This technique may prove to be useful in the future when I have more command line tools for other tasks, but currently there is a much simpler way of dealing with renaming menu items.</p>
<p>1. Right click on MainMenu.nib and select &#8220;Open As&#8221; -&gt; &#8220;Source Code File&#8221;</p>
<p>2. Press: &#8220;Command-F&#8221;  to open find/replace dialog</p>
<p>3. Replace all NewApplication strings with desired application name.</p>
<p>That&#8217;s it</p>
]]></content:encoded>
			<wfw:commentRss>http://www.furmanek.net/34/quick-rename-of-menu-items-in-xcode/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
