<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>agile mind</title>
	<atom:link href="http://perfp.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://perfp.wordpress.com</link>
	<description>Continous Learning</description>
	<lastBuildDate>Sun, 22 Jan 2012 09:52:19 +0000</lastBuildDate>
	<language>no</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='perfp.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>agile mind</title>
		<link>http://perfp.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://perfp.wordpress.com/osd.xml" title="agile mind" />
	<atom:link rel='hub' href='http://perfp.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Bringing my git-ignore settings with me</title>
		<link>http://perfp.wordpress.com/2012/01/22/bringing-my-git-ignore-settings-with-me/</link>
		<comments>http://perfp.wordpress.com/2012/01/22/bringing-my-git-ignore-settings-with-me/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 09:52:17 +0000</pubDate>
		<dc:creator>perfp</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://perfp.wordpress.com/?p=131</guid>
		<description><![CDATA[Since I&#8217;m working a lot of different places, and on quite a few different computers, I need to reconfigure my git-ignore settings every now and then. To manage my settings, I&#8217;ve put my git excludes in my Dropbox folder. This gives med the added advantage that all ignore settings are automatically syncronized between computers. This [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=131&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Since I&#8217;m working a lot of different places, and on quite a few different computers, I need to reconfigure my git-ignore settings every now and then. To manage my settings, I&#8217;ve put my git excludes in my Dropbox folder. This gives med the added advantage that all ignore settings are automatically syncronized between computers.</p>
<p>This is the file I have in Dropbox:</p>
<p><pre class="brush: plain;">

bin/
obj/
*.user
*.suo
_ReSharper.*/
</pre></p>
<p>And this is how git status looks like if I don&#8217;t use the ingore file:</p>
<p><a href="http://perfp.files.wordpress.com/2012/01/before.png"><img class="alignnone size-full wp-image-134" title="Before" src="http://perfp.files.wordpress.com/2012/01/before.png?w=590&#038;h=341" alt="" width="590" height="341" /></a></p>
<p>Git notifies me that the Visual Studio build output and local settings are in the repository but are untracked. As my solutions grow, this list can grow to be very big.</p>
<p>I run this statement in git bash, pointing to my dropbox folder on my D: drive. This should work from Windows Command Line too, but then you need to use the Windows path</p>
<p><pre class="brush: plain;">
git config --global core.excludesfile /d/Dropbox/git/excludes
</pre></p>
<p>Note that it&#8217;s important to use the &#8211;global flag to make it valid for all local repositories, as this makes the command store the setting in the .gitconfig in your HOME folder.<br />
When I now run git status, all the local files and settings from Visual Studio is now ignored:<br />
<a href="http://perfp.files.wordpress.com/2012/01/after.png"><img class="alignnone size-full wp-image-140" title="After" src="http://perfp.files.wordpress.com/2012/01/after.png?w=590&#038;h=341" alt="" width="590" height="341" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perfp.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perfp.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perfp.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perfp.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perfp.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perfp.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perfp.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perfp.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perfp.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perfp.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perfp.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perfp.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perfp.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perfp.wordpress.com/131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=131&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perfp.wordpress.com/2012/01/22/bringing-my-git-ignore-settings-with-me/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/169c69cbe588f597c1cff5553759adc7?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">perfp</media:title>
		</media:content>

		<media:content url="http://perfp.files.wordpress.com/2012/01/before.png" medium="image">
			<media:title type="html">Before</media:title>
		</media:content>

		<media:content url="http://perfp.files.wordpress.com/2012/01/after.png" medium="image">
			<media:title type="html">After</media:title>
		</media:content>
	</item>
		<item>
		<title>Google+</title>
		<link>http://perfp.wordpress.com/2011/08/10/google/</link>
		<comments>http://perfp.wordpress.com/2011/08/10/google/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 17:14:07 +0000</pubDate>
		<dc:creator>perfp</dc:creator>
				<category><![CDATA[social]]></category>

		<guid isPermaLink="false">http://perfp.wordpress.com/?p=107</guid>
		<description><![CDATA[Warning: this may seem like advertising! I&#8217;ve been hooked on Google+. Probably somewhat because of my geeky nature, but I love how often sharing on G+ turns into conversations. I also love the photo sharing functions with great image viewing functions and image details. Look at this example album: https://plus.google.com/photos/112163012415386550166/albums/5479744893742196977, and remember to click on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=107&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><em>Warning: this may seem like advertising!</em></p>
<p>I&#8217;ve been hooked on Google+. Probably somewhat because of my geeky nature, but I love how often sharing on G+ turns into conversations. I also love the photo sharing functions with great image viewing functions and image details. Look at this example album: https://plus.google.com/photos/112163012415386550166/albums/5479744893742196977, and remember to click on Actions -&gt; Details under the picture so you can see both the map of the location and the camera details.</p>
<p>I also like how easy I can share things from my phone. The fact that Google+ uses Picasa for picture sharing is an extra plus, I&#8217;ve used it for years and would never put an image on Facebook because of their shady privacy policy.</p>
<p>I believe that the worst hype is over, but if you still haven&#8217;t gotten an inviation, here is one for you:</p>
<p><a href="https://plus.google.com/_/notifications/ngemlink?path=%2F%3Fgpinv%3DQzg7ugB0SDY%3ATLC7AN5MlTo" title="https://plus.google.com/_/notifications/ngemlink?path=%2F%3Fgpinv%3DQzg7ugB0SDY%3ATLC7AN5MlTo" target="_blank">https://plus.google.com/_/notifications/ngemlink?path=%2F%3Fgpinv%3DQzg7ugB0SDY%3ATLC7AN5MlTo</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perfp.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perfp.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perfp.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perfp.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perfp.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perfp.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perfp.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perfp.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perfp.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perfp.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perfp.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perfp.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perfp.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perfp.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=107&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perfp.wordpress.com/2011/08/10/google/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/169c69cbe588f597c1cff5553759adc7?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">perfp</media:title>
		</media:content>
	</item>
		<item>
		<title>An adventure in XCode and Cocoa</title>
		<link>http://perfp.wordpress.com/2011/08/10/an-adventure-in-xcode-and-cocoa/</link>
		<comments>http://perfp.wordpress.com/2011/08/10/an-adventure-in-xcode-and-cocoa/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 07:00:25 +0000</pubDate>
		<dc:creator>perfp</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://perfp.wordpress.com/?p=111</guid>
		<description><![CDATA[Since I haven&#8217;t learned a new language in a while, I wanted to try something new. Next stop Cocoa Mac and XCode. It took quite a while to figure out how the Interface Builder and XCode worked together, but I&#8217;ll try to give a quick explanation: First I created a new Application, and XCode created [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=111&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Since I haven&#8217;t learned a new language in a while, I wanted to try something new. Next stop Cocoa Mac and XCode.</p>
<p>It took quite a while to figure out how the Interface Builder and XCode worked together, but I&#8217;ll try to give a quick explanation:<br />
First I created a new Application, and XCode created a XIB-file for me. This was called MainMenu.xib and contained both a system menu and a view. The XIB could be opened in Interface Builder, and I could draw the UI.</p>
<p>I then created a Cocoa class that inherited from NSView. In this class I implemented my properties and methods, which is called Outlets and Actions. Using the correct types is important for the Interface Builder to work when connecting code and UI together.<br />
HelloWorldView.h<br />
<pre class="brush: objc;">
#import &lt;Cocoa/Cocoa.h&gt;
@interface HelloWorldView : NSView {
	IBOutlet NSTextField *words;
}
- (IBAction)sayHello:(id)sender;
@end
</pre></p>
<p>HelloWorldView.m<br />
<pre class="brush: objc;">
#import &quot;HelloWorldView.h&quot;
@implementation HelloWorldView
- (IBAction) sayHello:(id) sender{
	
	NSLog(@&quot;buttonClicked&quot;);
	
	[words setStringValue:@&quot;Hello, world&quot;];
	[words setNeedsDisplay:YES];
}
@end
</pre><br />
&nbsp;</p>
<p>Then I hooked this class up to the View using Interface Builder.<br />
<a href="http://perfp.files.wordpress.com/2011/08/picture-4.png"><img class="alignnone size-medium wp-image-113" title="Picture 4" src="http://perfp.files.wordpress.com/2011/08/picture-4.png?w=300&#038;h=123" alt="" width="300" height="123" /></a></p>
<p>Finally I hooked the text fields to the properties and the Buttons to the methods.<br />
<a href="http://perfp.files.wordpress.com/2011/08/picture-1.png"><img src="http://perfp.files.wordpress.com/2011/08/picture-1.png?w=300&#038;h=124" alt="IB Bindings" title="Interface Builder" width="300" height="124" class="alignnone size-medium wp-image-117" /></a><br />
Then I ended up with a working Cocoa mac app<br />
<a href="http://perfp.files.wordpress.com/2011/08/picture-3.png"><img src="http://perfp.files.wordpress.com/2011/08/picture-3.png?w=300&#038;h=91" alt="" title="Hello World App" width="300" height="91" class="alignnone size-medium wp-image-119" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perfp.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perfp.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perfp.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perfp.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perfp.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perfp.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perfp.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perfp.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perfp.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perfp.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perfp.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perfp.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perfp.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perfp.wordpress.com/111/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=111&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perfp.wordpress.com/2011/08/10/an-adventure-in-xcode-and-cocoa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/169c69cbe588f597c1cff5553759adc7?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">perfp</media:title>
		</media:content>

		<media:content url="http://perfp.files.wordpress.com/2011/08/picture-4.png?w=300" medium="image">
			<media:title type="html">Picture 4</media:title>
		</media:content>

		<media:content url="http://perfp.files.wordpress.com/2011/08/picture-1.png?w=300" medium="image">
			<media:title type="html">Interface Builder</media:title>
		</media:content>

		<media:content url="http://perfp.files.wordpress.com/2011/08/picture-3.png?w=300" medium="image">
			<media:title type="html">Hello World App</media:title>
		</media:content>
	</item>
		<item>
		<title>Using my Squeezebox Remote for traffic information</title>
		<link>http://perfp.wordpress.com/2011/02/10/using-my-squeezebox-remote-for-traffic-information/</link>
		<comments>http://perfp.wordpress.com/2011/02/10/using-my-squeezebox-remote-for-traffic-information/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 23:42:25 +0000</pubDate>
		<dc:creator>perfp</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[lua]]></category>
		<category><![CDATA[squeezebox]]></category>

		<guid isPermaLink="false">https://perfp.wordpress.com/2011/02/10/using-my-squeezebox-remote-for-traffic-information/</guid>
		<description><![CDATA[I have a Squeezebox Duet, which is great for playing music. But I knew that the remote control was an embedded system running Linux. It’s sitting in it’s charger right next to me during breakfast, and I’ve been thinking about whether it would be possible to use it to check when my bus is coming. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=100&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have a Squeezebox Duet, which is great for playing music. But I knew that the remote control was an embedded system running Linux. It’s sitting in it’s charger right next to me during breakfast, and I’ve been thinking about whether it would be possible to use it to check when my bus is coming. My bus is running along a road with heavy traffic, and it can be quite delayed during rush hours in the morning. And since the local traffic information agency is supplying free real time public transport information, I decided to give it a go.</p>
<h2>The result</h2>
<p>This is how the application looks right now. It’s currently in a state where it’s usable for me.</p>
<p><a href="http://perfp.files.wordpress.com/2011/02/image.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;margin:0;" title="image" border="0" alt="image" src="http://perfp.files.wordpress.com/2011/02/image_thumb.png?w=196&#038;h=244" width="196" height="244" /></a><a href="http://perfp.files.wordpress.com/2011/02/image1.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;margin:0;" title="image" border="0" alt="image" src="http://perfp.files.wordpress.com/2011/02/image_thumb1.png?w=198&#038;h=244" width="198" height="244" /></a><a href="http://perfp.files.wordpress.com/2011/02/image2.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="image" border="0" alt="image" src="http://perfp.files.wordpress.com/2011/02/image_thumb2.png?w=199&#038;h=244" width="199" height="244" /></a></p>
<p>If you have a squeezebox and are really bold, the applet can be dowloaded directly from the remote by adding <a title="https://github.com/downloads/perfp/TrafikantenSqueezebox/applets.xml" href="https://github.com/downloads/perfp/TrafikantenSqueezebox/applets.xml">https://github.com/downloads/perfp/TrafikantenSqueezebox/applets.xml</a> to your squeezebox plugin settings (and remember to enable 3. party plugins)</p>
<p>Also, if you wan’t to check out the source, it’s available on <a href="https://github.com/perfp/TrafikantenSqueezebox">https://github.com/perfp/TrafikantenSqueezebox</a></p>
<p>&#160;</p>
<h2>A few technical notes</h2>
<p>The Squeezebox runtime environment is called jive and can be programmed in <a href="http://www.lua.org">Lua</a>. Lua is a really simple scripting language with a few interesting features, like first-class functions, dynamic typing, garbage collection and closures. I also uses one specific structure for all state, the table, which is more or less a hash table.</p>
<p>After playing a bit with Lua, I started looking at creating Applets for Squeezebox. At first this seemed like a simple task, since Logitech has been kind enough to supply both <a href="http://wiki.slimdevices.com/index.php/SqueezePlay_Applet_Guide">development guide</a> in their wiki and SqueezePlay, a Windows/Linux/Mac version of the remote control software.</p>
<p>But the documentation is really poor. And they are using a patched version of the interpreter that uses a different syntax from the standard Lua parser. This means that you cannot use the lua parser to unit test your functions.</p>
<p>Another issue is that there is no apparent way to address the file system to reference modules. This is a problem because the relative file structure in squeezeplay on windows is different from the actual hardware, so relative references won’t work.</p>
<p>There is no date/time functions available in the runtime, and the only decent library I could find did not work on the squeezebox, unfortunately.</p>
<p>I still had a lot of fun exploring this platform and learning a new language.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perfp.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perfp.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perfp.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perfp.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perfp.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perfp.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perfp.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perfp.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perfp.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perfp.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perfp.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perfp.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perfp.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perfp.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=100&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perfp.wordpress.com/2011/02/10/using-my-squeezebox-remote-for-traffic-information/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/169c69cbe588f597c1cff5553759adc7?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">perfp</media:title>
		</media:content>

		<media:content url="http://perfp.files.wordpress.com/2011/02/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://perfp.files.wordpress.com/2011/02/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://perfp.files.wordpress.com/2011/02/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing Oracle Client on Windows 7</title>
		<link>http://perfp.wordpress.com/2011/01/25/installing-oracle-client-on-windows-7/</link>
		<comments>http://perfp.wordpress.com/2011/01/25/installing-oracle-client-on-windows-7/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 12:26:12 +0000</pubDate>
		<dc:creator>perfp</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://perfp.wordpress.com/2011/01/25/installing-oracle-client-on-windows-7/</guid>
		<description><![CDATA[During the install of Oracle Client on my brand new Windows 7 machine, I got the following error: This seemed like a showstopper to me, but was actually just bad usability from Oracle (surprise!): Checking the checkbox changes the status from &#8220;Error&#8221; to &#8220;User verified&#8221;, and allows me to continue installing… Great! What I really [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=93&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>During the install of Oracle Client on my brand new Windows 7 machine, I got the following error:
</p>
<p><img src="http://perfp.files.wordpress.com/2011/01/012511_1225_installingo1.png?w=590" alt="" />
	</p>
<p>This seemed like a showstopper to me, but was actually just bad usability from Oracle (surprise!):
</p>
<p>Checking the checkbox changes the status from &#8220;Error&#8221; to &#8220;User verified&#8221;, and allows me to continue installing…
</p>
<p><img src="http://perfp.files.wordpress.com/2011/01/012511_1225_installingo2.png?w=590" alt="" />
	</p>
<p>Great!
</p>
<p>What I really wanted was the 64-bit versjon,  but that&#8217;s another story…</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perfp.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perfp.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perfp.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perfp.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perfp.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perfp.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perfp.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perfp.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perfp.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perfp.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perfp.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perfp.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perfp.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perfp.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=93&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perfp.wordpress.com/2011/01/25/installing-oracle-client-on-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/169c69cbe588f597c1cff5553759adc7?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">perfp</media:title>
		</media:content>

		<media:content url="http://perfp.files.wordpress.com/2011/01/012511_1225_installingo1.png" medium="image" />

		<media:content url="http://perfp.files.wordpress.com/2011/01/012511_1225_installingo2.png" medium="image" />
	</item>
		<item>
		<title>Using Visual Studio Find and Replace for language transformations</title>
		<link>http://perfp.wordpress.com/2010/12/09/using-visual-studio-find-and-replace-for-language-transformations/</link>
		<comments>http://perfp.wordpress.com/2010/12/09/using-visual-studio-find-and-replace-for-language-transformations/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 17:34:08 +0000</pubDate>
		<dc:creator>perfp</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://perfp.wordpress.com/?p=86</guid>
		<description><![CDATA[Sometimes I need to create code from data, normally to create scripts for deployment to multiple environments. Since this often is a one time job, it makes no sense to make or buy a tool for doing this. Being a former Perl-programmer, I have a powerful tool in my toolbelt: regex. This is a real [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=86&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Sometimes I need to create code from data, normally to create scripts for deployment to multiple environments. Since this often is a one time job, it makes no sense to make or buy a tool for doing this.<br />
Being a former Perl-programmer, I have a powerful tool in my toolbelt: regex.<br />
This is a real example from a recent project.</p>
<p>I had quite a few sql-statements like this:<br />
<code>update maparea set extentx1=100616, extentx2=6654051,extenty1=139033,extenty2=6700901 where id = 110;</code></p>
<p>I wanted to create migration code for FluentMigrations, which should look like this:<br />
<code>Update.Table("maparea").Set(new {extentx1=179073, extentx2=7001157,extenty1=202727,extenty2=7012535}).Where(new {id= 390});</code><br />
I pasted the sql statements into visual studio, and used Find and Replace to convert the statements.<br />
Find what:<br />
<code>update {:w} set {.+} where {:w= :z}.+</code><br />
Replace with:<br />
<code>Update.Table("\1").Set(new {\2}).Where(new {\3});</code></p>
<p>The trick is using {groups}to match the part of the expression I want to reuse in my new code, and group references, \1, \2 etc., to insert it in the right place.</p>
<p>After that I just press Replace All : )</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perfp.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perfp.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perfp.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perfp.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perfp.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perfp.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perfp.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perfp.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perfp.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perfp.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perfp.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perfp.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perfp.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perfp.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=86&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perfp.wordpress.com/2010/12/09/using-visual-studio-find-and-replace-for-language-transformations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/169c69cbe588f597c1cff5553759adc7?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">perfp</media:title>
		</media:content>
	</item>
		<item>
		<title>Oracle and HTTP_PROXY</title>
		<link>http://perfp.wordpress.com/2010/11/26/oracle-and-http_proxy/</link>
		<comments>http://perfp.wordpress.com/2010/11/26/oracle-and-http_proxy/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 17:36:17 +0000</pubDate>
		<dc:creator>perfp</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://perfp.wordpress.com/?p=82</guid>
		<description><![CDATA[I&#8217;ve been working with Oracle lately. I&#8217;ve installed a local instance of Oracle XE to use while developing to make it easier for me to test NHibernate Mappings and Fluent Migrator (which is a really nice product, there will be a blog post about it someday). Anyway, I&#8217;ve had all sorts of strange errors happen [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=82&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working with Oracle lately. I&#8217;ve installed a local instance of Oracle XE to use while developing to make it easier for me to test NHibernate Mappings and Fluent Migrator (which is a really nice product, there will be a blog post about it someday).</p>
<p>Anyway, I&#8217;ve had all sorts of strange errors happen to me, and the strange thing was that none of these happened at home, only at work:</p>
<p>Immediately after install, http://localhost:8080/apex wasn&#8217;t working. Checking the logs gave me no useful information, they looked like this:<br />
<code>2010-11-23 16:08:35.574: [ CSSCLNT][3364]clsssinit: error(33 ) in OCR initialization<br />
[  OCRUTL][6304]u_set_comp_error: Parameter was NULL<br />
[  OCRUTL][6304]u_set_ocr_error: Parameter was NULL<br />
2010-11-26 12:17:41.822: [  OCROSD][6304]utgdv:1:could not open registry key SOFTWARE\Oracle\ocr os error The system could not find the environment option that was entered.<br />
[  OCRUTL][6304]u_set_gbl_comp_error: Parameter was NULL<br />
[  OCRUTL][6304]u_set_gbl_comp_error: Parameter was NULL<br />
2010-11-26 12:17:41.822: [  OCRRAW][6304]proprinit: Could not open raw device<br />
2010-11-26 12:17:41.822: [ default][6304]a_init:7!: Backend init unsuccessful : [33]<br />
[  OCRUTL][6304]u_set_ocr_error: Parameter was NULL </code></p>
<p>All suggestions i found on the net pointed to using SQL*plus to update and check system variables. But SQL*plus gave me this:<br />
<code><br />
Error 46 initializing SQL*Plus<br />
HTTP proxy setting has incorrect value<br />
SP2-1502: The HTTP proxy server specified by http_proxy is not accessible<br />
</code></p>
<p>&nbsp;<br />
OK, thats a hint: remove the HTTP_PROXY system variable (which I&#8217;ve set to be able to use cygwin, maven and other command line tools that needs to download stuff from the web). That fixed SQL*plus, but surprisingly also fixed Apex ??! And not because the browser was using HTTP_PROXY, I tried using telnet to port 8080. It the port is open and accepts input, but after typing the usual:<br />
<code><br />
GET /apex HTTP/1.1<br />
Location: locahost<br />
</code><br />
the connection will hang indefinitely with no response.</p>
<p><del datetime="2011-02-11T07:59:32+00:00">Conclusion:<br />
You can&#8217;t use the HTTP_PROXY system variable when running Oracle on your system!</del></p>
<p>Update: The subtitle of this blog is continous learning. And so I learn:<br />
If you make sure that your HTTP_PROXY variable is a valid url:<code>http://proxyserver:port/</code> it will work just fine&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perfp.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perfp.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perfp.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perfp.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perfp.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perfp.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perfp.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perfp.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perfp.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perfp.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perfp.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perfp.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perfp.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perfp.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=82&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perfp.wordpress.com/2010/11/26/oracle-and-http_proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/169c69cbe588f597c1cff5553759adc7?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">perfp</media:title>
		</media:content>
	</item>
		<item>
		<title>Mass converting video files using powershell and handbrake</title>
		<link>http://perfp.wordpress.com/2010/08/25/mass-converting-video-files-using-powershell-and-handbrake/</link>
		<comments>http://perfp.wordpress.com/2010/08/25/mass-converting-video-files-using-powershell-and-handbrake/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 21:16:28 +0000</pubDate>
		<dc:creator>perfp</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://perfp.wordpress.com/?p=69</guid>
		<description><![CDATA[Update 26.10.2011: Doug made me aware of some errors in the script, and I&#8217;ve updated the script. I&#8217;ve also added a section on Power Shell execution policy to allow running this from a ps1-script. I&#8217;ve been recording the life of my family for a few years, and that has resulted in almost 1000 video files. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=69&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><em>Update 26.10.2011: Doug made me aware of some errors in the script, and I&#8217;ve updated the script. I&#8217;ve also added a section on Power Shell execution policy to allow running this from a ps1-script.</em></p>
<p>I&#8217;ve been recording the life of my family for a few years, and that has resulted in almost 1000 video files. What I really would like to do with those was to watch them on my Xbox or my phone. My video camera creates MPEG2, which supposedly is better for editing than MP4, but I&#8217;m not very good with video editing, so I don&#8217;t really do that. I&#8217;ve been looking for software to convert my videos, but all my attempts so far has resulted in a terrible quality loss. But then I found <a href="http://handbrake.fr/">Handbrake</a>. Handbrake converts my videos to high quality MP4, and reduces the size to about 20% of the original, and optimizes it for progressive play from web.</p>
<p>When you create a conversion task queue in Handbrake, you can choose to save the queue as a batch file for later execution. I did that, and it created a normal bat-file. The file looked like this:</p>
<p><pre class="brush: powershell;">&quot;C:\Program Files (x86)\Handbrake\HandBrakeCLI.exe&quot; -i &quot;Z:\M2U00022.MPG&quot; -t 1 -c 1 -o &quot;C:\temp\M2U00022.mp4&quot;
-f mp4 --strict-anamorphic  -e x264 -q 20 -a 1 -E faac -6 dpl2 -R 48 -B 160
-D 0.0 -x ref=2:bframes=2:subq=6:mixed-refs=0:weightb=0:8x8dct=0:trellis=0 -v 1

</pre></p>
<p>Using powershell it was easy to  create a mass conversion of all my video files:</p>
<p><pre class="brush: powershell;">
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath
$files = get-childitem -Recurse -Include &quot;*.mpg&quot;
foreach ($file in $files) {
 $subpath = $file.DirectoryName.Replace([Environment]::CurrentDirectory , &quot;&quot;)
 $destname = &quot;C:\temp&quot; + $subpath + &quot;\&quot; + $file.BaseName + &quot;.mp4&quot;
 if (!(test-path $destname)) {
 &amp; &quot;C:\Program Files (x86)\Handbrake\HandBrakeCLI.exe&quot; -i $file -t 1 -c 1 -o $destname  -f mp4 --strict-anamorphic  -e x264 -q 20 -a 1 -E faac -6 dpl2 -R 48 -B 160 -D 0.0 -x ref=2:bframes=2:subq=6:mixed-refs=0:weightb=0:8x8dct=0:trellis=0 -v 1
 }
}
</pre></p>
<p>Since I&#8217;m converting about 1000 files that are about 25 GB in total size, I even threw in a check for existing files at the destination so that I easily could break execution and restart it.</p>
<p>If you are running this code from a .PS1-file, you might get this error:<br />
<em>File convert.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see &#8220;get-help about_signing&#8221; for more details.</em><br />
This is because the policy for executing  powershell scripts is disabled by default. To allow running scripts on a computer, run</p>
<p><pre class="brush: plain;">

Set-ExecutionPolicy RemoteSigned </pre></p>
<p>from an elevated PowerShell session.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perfp.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perfp.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perfp.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perfp.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perfp.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perfp.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perfp.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perfp.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perfp.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perfp.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perfp.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perfp.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perfp.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perfp.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=69&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perfp.wordpress.com/2010/08/25/mass-converting-video-files-using-powershell-and-handbrake/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/169c69cbe588f597c1cff5553759adc7?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">perfp</media:title>
		</media:content>
	</item>
		<item>
		<title>Troubleshooting errors in WCF Service</title>
		<link>http://perfp.wordpress.com/2010/08/06/troubleshooting-errors-in-wcf-service/</link>
		<comments>http://perfp.wordpress.com/2010/08/06/troubleshooting-errors-in-wcf-service/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 19:00:05 +0000</pubDate>
		<dc:creator>perfp</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://perfp.wordpress.com/?p=62</guid>
		<description><![CDATA[WCF hides all details of any errors on the server. This is done deliberately, as a security feature, but it makes it a bit harder to troubleshoot when something goes wrong. Fortunately, Microsoft has provided some good tools for tracing in WCF, so it&#8217;s quite easy to see what&#8217;s really going on on the server. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=62&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>WCF hides all details of any errors on the server. This is done deliberately, as a security feature, but it makes it a bit harder to troubleshoot when something goes wrong.<br />
Fortunately, Microsoft has provided some good tools for tracing in WCF, so it&#8217;s quite easy to see what&#8217;s really going on on the server.</p>
<p>What you typically see on the client is this:</p>
<p><pre class="brush: css;">   A first chance exception of type 'System.ServiceModel.CommunicationException' occurred in mscorlib.dll System.ServiceModel.CommunicationException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
---&gt; System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
---&gt;; System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
---&gt;; System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
  at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
</pre></p>
<p>On Server you must make the following change to the WCF service application config file (web.config if the server is hosted in IIS)</p>
<p><pre class="brush: xml;">
&lt;system.diagnostics&gt;
&lt;sources&gt;
&lt;source name=&quot;System.ServiceModel&quot;
switchValue=&quot;Information, ActivityTracing&quot;
propagateActivity=&quot;true&quot;&gt;
&lt;listeners&gt;
&lt;add name=&quot;traceListener&quot;
type=&quot;System.Diagnostics.XmlWriterTraceListener&quot;
initializeData= &quot;D:\logs\Traces.svclog&quot; /&gt;
&lt;/listeners&gt;
&lt;/source&gt;
&lt;/sources&gt;
&lt;/system.diagnostics&gt;
</pre></p>
<p>Rerun request, and watch the traces.svclog file appear under logs.</p>
<p><a href="http://perfp.files.wordpress.com/2010/08/image.png"><img style="display:inline;border-width:0;" title="image" src="http://perfp.files.wordpress.com/2010/08/image_thumb.png?w=244&#038;h=53" border="0" alt="image" width="244" height="53" /></a></p>
<p>The contents of the logfile looks like this:</p>
<p><pre class="brush: xml;">
&lt;E2ETraceEvent xmlns=&quot;http://schemas.microsoft.com/2004/06/E2ETraceEvent&quot;&gt;&lt;System xmlns=&quot;http://schemas.microsoft.com/2004/06/windows/eventlog/system&quot;&gt;&lt;EventID&gt;0&lt;/EventID&gt;&lt;Type&gt;3&lt;/Type&gt;&lt;SubType Name=&quot;Transfer&quot;&gt;0&lt;/SubType&gt;&lt;Level&gt;255&lt;/Level&gt;&lt;TimeCreated SystemTime=&quot;2010-08-06T07:01:12.0107773Z&quot; /&gt;&lt;Source Name=&quot;System.ServiceModel&quot; /&gt;
</pre></p>
<p>This is very verbose and quite unreadable. But then again, XML was never intended for humans&#8230;</p>
<p>Time to find a tool that can parse this. In the Windows SDK that is shipped with Visual Studio there is a tool called Service Trace Viewer.</p>
<p><a href="http://perfp.files.wordpress.com/2010/08/image1.png"><img style="display:inline;border-width:0;" title="image" src="http://perfp.files.wordpress.com/2010/08/image_thumb1.png?w=190&#038;h=244" border="0" alt="image" width="190" height="244" /></a></p>
<p>When you start the Service Trace Viewer and load the tracefile that was produced from the WCF Service, you will get a view that looks like this:</p>
<p><a href="http://perfp.files.wordpress.com/2010/08/image2.png"><img style="display:inline;border-width:0;" title="image" src="http://perfp.files.wordpress.com/2010/08/image_thumb2.png?w=450&#038;h=210" border="0" alt="image" width="450" height="210" /></a></p>
<p>Now, the errors that occured in the Service is highlighted in big red letters.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perfp.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perfp.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perfp.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perfp.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perfp.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perfp.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perfp.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perfp.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perfp.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perfp.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perfp.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perfp.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perfp.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perfp.wordpress.com/62/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=62&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perfp.wordpress.com/2010/08/06/troubleshooting-errors-in-wcf-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/169c69cbe588f597c1cff5553759adc7?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">perfp</media:title>
		</media:content>

		<media:content url="http://perfp.files.wordpress.com/2010/08/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://perfp.files.wordpress.com/2010/08/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://perfp.files.wordpress.com/2010/08/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Expanding my bootable VHD</title>
		<link>http://perfp.wordpress.com/2009/12/18/expanding-my-bootable-vhd/</link>
		<comments>http://perfp.wordpress.com/2009/12/18/expanding-my-bootable-vhd/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 08:20:00 +0000</pubDate>
		<dc:creator>perfp</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://perfp.wordpress.com/2009/12/18/expanding-my-bootable-vhd/</guid>
		<description><![CDATA[I just love booting from VHD in Windows 7. I have a playground for prerelease software, and just now Microsoft is releasing a torrent of them for the coming 2010 wave. But the other day the VHD I booted from ran full. The disk is dynamic, but had a max size of 25 GB. After [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=54&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just love booting from VHD in Windows 7. I have a playground for prerelease software, and just now Microsoft is releasing a torrent of them for the coming 2010 wave.</p>
<p>But the other day the VHD I booted from ran full. The disk is dynamic, but had a max size of 25 GB. After booting back to my physical drive, I tried Disk Management, but there was no option to expand the VHD there. The solution was a two step procedure:</p>
<p>1) Use DISKPART to expand the file:</p>
<blockquote><p>select vdisk file=c:\vm\example.vhd      <br />expand vdisk maximum=20000</p>
</blockquote>
<p>2) Attach the VHD. In Disk Management you will see this:    <br /><a href="http://perfp.files.wordpress.com/2009/12/image.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://perfp.files.wordpress.com/2009/12/image_thumb.png?w=406&#038;h=76" width="406" height="76" /></a>&#160; <br />Right-click the volume (F:) and select Extend Volume.</p>
<p>Alternative 2): Complete the process without leaving diskpart. Make sure you you use the correct warning for </p>
<blockquote><p><font color="#333333">attach vdisk        <br /></font><font color="#333333">select volume F:        <br /></font><font color="#333333">extend filesystem</font></p>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perfp.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perfp.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perfp.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perfp.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perfp.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perfp.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perfp.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perfp.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perfp.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perfp.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perfp.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perfp.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perfp.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perfp.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perfp.wordpress.com&amp;blog=6221656&amp;post=54&amp;subd=perfp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perfp.wordpress.com/2009/12/18/expanding-my-bootable-vhd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/169c69cbe588f597c1cff5553759adc7?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">perfp</media:title>
		</media:content>

		<media:content url="http://perfp.files.wordpress.com/2009/12/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>
