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

<channel>
	<title>Adam Driscoll&#039;s Blog</title>
	<atom:link href="http://csharpening.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://csharpening.net</link>
	<description></description>
	<lastBuildDate>Mon, 14 May 2012 01:57:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Weekend Project: Microsoft vs Apple Bag Toss</title>
		<link>http://csharpening.net/?p=1162</link>
		<comments>http://csharpening.net/?p=1162#comments</comments>
		<pubDate>Mon, 14 May 2012 01:57:11 +0000</pubDate>
		<dc:creator>adamdriscoll</dc:creator>
				<category><![CDATA[hardware]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[bag toss]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">http://csharpening.net/?p=1162</guid>
		<description><![CDATA[Last summer I found some really nice bag toss boards in the dumpster. I snagged them with the intention of refurbishing them to my liking. I finally got around to it today! I opted for a Microsoft vs Apple theme. Here&#8217;s the process. Tools: Detail Sander Old Shoes Supplies: Sander Pads 1x Flat Blue, Grey, [...]]]></description>
			<content:encoded><![CDATA[<p>Last summer I found some really nice bag toss boards in the dumpster. I snagged them with the intention of refurbishing them to my liking. I finally got around to it today! I opted for a Microsoft vs Apple theme. Here&#8217;s the process.</p>
<p><strong>Tools:</strong></p>
<ul>
<li><a href="http://www.amazon.com/dp/B001H0GC04/ref=asc_df_B001H0GC042014869?smid=ATVPDKIKX0DER&amp;tag=hyprod-20&amp;linkCode=asn&amp;creative=395093&amp;creativeASIN=B001H0GC04&amp;hvpos=1o1&amp;hvexid=&amp;hvnetw=g&amp;hvrand=7385078361747342023&amp;hvpone=&amp;hvptwo=&amp;hvqmt=">Detail Sander</a></li>
<li>Old Shoes</li>
</ul>
<p><strong>Supplies:</strong></p>
<ul>
<li><a href="http://www.amazon.com/BLACK-DECKER-ACCESSORIES-74-586-Sandpaper/dp/B0000302UF">Sander Pads</a></li>
<li>1x Flat Blue, Grey, Black, Yellow, Orange, Green, White Spray Paint</li>
<li>2x Clear Coat</li>
<li><a href="http://beeradvocate.com/beer/profile/13837/36045">1x Ale Asylum Sticky McDoogle</a></li>
</ul>
<p><strong>Step 1: Sand</strong></p>
<p>I actually did this last summer. I used the detail sander (orbital would have been better but didn&#8217;t have one) to remove a lot of the previous paint. I started with some corse grit and worked my way up to something like 220 grit.</p>
<p><strong>Step 2: Base Coat</strong></p>
<p>I decided not to prime the boards. These will always be used outside and I didn&#8217;t want to have to buy more paint than necessary. Since the Microsoft logo has 4 different colors, the paint added up quickly.  I had to do about 2 coats to evenly coat and cover the previous color.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_14-17-36_258.jpg"><img class="alignnone size-medium wp-image-1165" title="2012-05-13_14-17-36_258" src="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_14-17-36_258-169x300.jpg" alt="" width="169" height="300" /></a><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_14-17-27_55.jpg"><img class="alignnone size-medium wp-image-1164" title="2012-05-13_14-17-27_55" src="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_14-17-27_55-169x300.jpg" alt="" width="169" height="300" /></a></p>
<p><strong>Step 3: Stencil Design</strong></p>
<p>While the paint was drying I created the pattern for each of the boards. The Microsoft logo is the same shape repeated 4 times. I cut a piece of cardboard into the shape I wanted. I was looking for a logo size of about 20 square inches so I made the shape 10 inches squared.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_14-43-25_531.jpg"><img class="alignnone size-medium wp-image-1167" title="2012-05-13_14-43-25_531" src="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_14-43-25_531-300x169.jpg" alt="" width="300" height="169" /></a></p>
<p>For the Apple logo I opted to go with Rosin paper for the design. I couldn&#8217;t find a good piece of cardboard so I just grabbed it from the basement. I drew on the logo, freehand, by copying it from the computer. Then I cut it out with a scissors. It was close enough. <img src='http://csharpening.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_14-43-21_157.jpg"><img class="alignnone size-medium wp-image-1166" title="2012-05-13_14-43-21_157" src="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_14-43-21_157-300x169.jpg" alt="" width="300" height="169" /></a></p>
<p><strong>Step 4: Logo Application</strong></p>
<p>Luckily it was sunny and hot today in Madison so the paint dried really quickly. For the Microsoft logo I measured an approximate location for the first shape and placed the stencil accordingly. I sprayed on orange first. I then waited for that color to dry and moved to the next. Working my way through all four shapes.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_15-09-37_611.jpg"><img class="alignnone size-medium wp-image-1175" title="2012-05-13_15-09-37_611" src="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_15-09-37_611-169x300.jpg" alt="" width="169" height="300" /></a></p>
<p>I used my hand and foot to hold the stencil in place while painting and removed it right after I was done. I made sure to wear crappy shoes.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_15-09-53_8.jpg"><img class="alignnone size-medium wp-image-1176" title="2012-05-13_15-09-53_8" src="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_15-09-53_8-169x300.jpg" alt="" width="169" height="300" /></a></p>
<p>I rolled up painters tape and stuck the Apple stencil to the other board.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_15-01-01_679.jpg"><img class="alignnone size-medium wp-image-1168" title="2012-05-13_15-01-01_679" src="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_15-01-01_679-169x300.jpg" alt="" width="169" height="300" /></a></p>
<p>I then just sprayed on the white. It took a good three coats to cover the black underneath.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_15-09-29_700.jpg"><img class="alignnone size-medium wp-image-1169" title="2012-05-13_15-09-29_700" src="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_15-09-29_700-169x300.jpg" alt="" width="169" height="300" /></a></p>
<p><strong>Step 5: Clear Coat</strong></p>
<p>I removed the stencils from the Microsoft logo promptly. Once all the shapes were painted and dried, I applied two clear coats.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_15-47-43_599.jpg"><img class="alignnone size-medium wp-image-1172" title="2012-05-13_15-47-43_599" src="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_15-47-43_599-169x300.jpg" alt="" width="169" height="300" /></a></p>
<p>When I removed the Rosin paper from the Apple logo, I found that some of the paint had snuck underneath. I kind of knew this was going to happen but was pleasantly surprised by the glowing effect it created.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_15-18-31_999.jpg"><img class="alignnone size-medium wp-image-1170" title="2012-05-13_15-18-31_999" src="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_15-18-31_999-169x300.jpg" alt="" width="169" height="300" /></a></p>
<p>I washed the board down with some warn water and let it dry. I then applied a couple clear coats.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_15-41-54_720.jpg"><img class="alignnone size-medium wp-image-1171" title="2012-05-13_15-41-54_720" src="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_15-41-54_720-169x300.jpg" alt="" width="169" height="300" /></a></p>
<p><strong>Step 6: Beer</strong></p>
<p>I then enjoyed my beer and took a glamour shot of the finished products. Now to buy some bags and have a barbeque!</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_18-16-16_486.jpg"><img class="alignnone size-medium wp-image-1174" title="2012-05-13_18-16-16_486" src="http://csharpening.net/wp-content/uploads/2012/05/2012-05-13_18-16-16_486-300x169.jpg" alt="" width="300" height="169" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://csharpening.net/?feed=rss2&#038;p=1162</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Management OData and PowerShell</title>
		<link>http://csharpening.net/?p=1141</link>
		<comments>http://csharpening.net/?p=1141#comments</comments>
		<pubDate>Thu, 10 May 2012 19:00:05 +0000</pubDate>
		<dc:creator>adamdriscoll</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[management odata]]></category>
		<category><![CDATA[odata]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[powershell 3.0]]></category>
		<category><![CDATA[windows server 2012]]></category>

		<guid isPermaLink="false">http://csharpening.net/?p=1141</guid>
		<description><![CDATA[There is a new feature of Windows Server 8 that will allow for access to PowerShell cmdlets and objects via OData served through ASP.NET. Doug Finke wrote a blog post for PowerShell Magazine on the topic. The article gives a good overview of what the Management OData feature is and how to configure it. In [...]]]></description>
			<content:encoded><![CDATA[<p>There is a new feature of Windows Server 8 that will allow for access to PowerShell cmdlets and objects via OData served through ASP.NET. Doug Finke wrote a blog post for <a href="http://www.powershellmagazine.com/2011/09/24/powershell-vnext-web-service-entities/">PowerShell Magazine</a> on the topic. The article gives a good overview of what the Management OData feature is and how to configure it. In this blog post I will be showing off some of the steps involved in getting the service configured and what it looks like to consume the OData in PowerShell.</p>
<p><strong>Setting Up the Management OData Feature</strong></p>
<p>The first step in utilizing the Management OData in Windows Server 2012 is to enable the feature. You can either use Server Manager or the following cmdlet.</p>
<pre>Install-WindowsFeature -Name ManagementOData</pre>
<p>Once the feature has been installed you will need to install <a href="http://www.microsoft.com/en-us/download/details.aspx?id=28975">Visual Studio 2011 Beta</a> on the Server machine. I hope there is better tooling around this but currently this is what is required in order to build the samples found on <a href="http://archive.msdn.microsoft.com/mgmtODataWebServ">MSDN</a>. Make sure to download the <a href="http://archive.msdn.microsoft.com/mgmtODataWebServ/Release/ProjectReleases.aspx?ReleaseId=5728">Management OData Schema Designer</a>. For a whole lot information on the topic, download and read the <a href="http://archive.msdn.microsoft.com/mgmtODataWebServ/Release/ProjectReleases.aspx?ReleaseId=5839">whitepaper</a>. It walks you through all the steps I&#8217;m about to, in more detail.</p>
<p><strong>What Management OData Does</strong></p>
<p>In simple terms (read Doug&#8217;s post for more info), the Management OData service provides RESTful endpoints that server up PowerShell objects. The schema designer is used to map cmdlets and their resulting objects to OData objects. These can then be served as JSON back through the endpoint to the client.  The Management OData Schema Designer is used to take existing modules, cmdlets and objects and map them to XML files that can then be consumed by the Management OData system and served to clients. Included with the examples are PowerShell scripts used to install the OData endpoints once they have been compiled.</p>
<p><strong>Installing the Basic Endpoint Sample</strong></p>
<p>Once Visual Studio 2011 has been installed open the BasicPlugin.sln solution. You can download the sample <a href="http://code.msdn.microsoft.com/windowsdesktop/PswsRoleBasedPlugins-1c7a7ef1">here</a>. Once the solution is open, build it. Once the solution is built, run the SetupEndpoints.ps1 file to configure the endpoint on the local server. The file is part of the Basic Endpoint solution folder. You should now be able to navigate to the URL:</p>
<p><span style="color: #000080;"><span style="color: #000080;">http://localhost:7000/MODataSvc/Microsoft.Management.Odata.svc</span></span></p>
<p>This should result in this:</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/root.png"><img class="alignnone size-medium wp-image-1145" title="root" src="http://csharpening.net/wp-content/uploads/2012/05/root-300x131.png" alt="" width="300" height="131" /></a></p>
<p>To query particular resources, you can now query it like so <span style="color: #000080;">http://localhost:7000/MODataSvc/Microsoft.Management.Odata.svc/Process</span>. This will return all the processes on the server machine. The Content property contains all the XML for the objects.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/process.png"><img class="alignnone size-medium wp-image-1144" title="process" src="http://csharpening.net/wp-content/uploads/2012/05/process-300x154.png" alt="" width="300" height="154" /></a></p>
<p>Additionally, processes can be filtered using a URI-based syntax. For example:</p>
<p><span style="color: #000080;">http://localhost:7000/MODataSvc/Microsoft.Management.Odata.svc/Process?$filter=(Handles gt 1000)</span></p>
<p>By default the returned format will be XML. In order to return JSON, you have to use the following syntax.</p>
<p><span style="color: #000080;">http://localhost:7000/MODataSvc/Microsoft.Management.Odata.svc/Process?$format=JSON</span></p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/json.png"><img class="alignnone size-medium wp-image-1146" title="json" src="http://csharpening.net/wp-content/uploads/2012/05/json-300x144.png" alt="" width="300" height="144" /></a></p>
<p>Remember that you can utilize the new ConvertFrom-Json cmdlet to to convert the JSON to objects.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/results.png"><img class="alignnone size-medium wp-image-1147" title="results" src="http://csharpening.net/wp-content/uploads/2012/05/results-300x175.png" alt="" width="300" height="175" /></a></p>
<p>Pretty powerful stuff!</p>
<p><strong>Adding new Cmdlets and Objects</strong></p>
<p>The Management OData Schema Designer is used to add more entities to the OData service. Once installed there should be an icon placed on the desktop. Open the designer. The first step is to load a module that you want to model and expose in OData. For this example I will use the NetAdapter module. Type the module name into the text box and click Load New Module. Once the module is loaded you will see a big list of the types of entities the designer finds within the module. These coincide with the nouns of the cmdlets within the module. The verbs Get, Set, New, Remove will appear as check boxes next to the noun names. If a cmdlet is not defined the verb will be grayed out.</p>
<p>In order to map a new OData action and entity, check one of the verb for a noun. I selected the Get and NetAdapter verb and noun. Next click the &#8220;from cmdlet output&#8221; button. The cmdlet will appear in the displayed box. Clicking Add-Type will add the new OData entity. In order to successfully generate the MOF and XML needed to define the object, you will need to set a Key property. This is the uniquely defining property on the object. Name is already selected for NetAdapter.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/designer.png"><img class="alignnone size-medium wp-image-1152" title="designer" src="http://csharpening.net/wp-content/uploads/2012/05/designer-300x212.png" alt="" width="300" height="212" /></a></p>
<p>Now you can click Generate Mof/Xml Schema. This will produce the mapping files that the Management OData service will use to translate between the REST request and the PowerShell cmdlet and resulting objects. Once saved, you can place this in<span style="color: #000080;"> C:\inetpub\wwwroot\modata</span>.</p>
<p>Since the OData endpoint is constrained we need to play with the BasicPlugin a bit to get it to load the module we would like. In Visual Studio, I added the following lines to get the NetAdapter module to load into the runspace and to set the visibility of the proper cmdlets in the runspace. I just set them all to visible. Once built, copy the resulting DLL into the MOData folder and replace the one that is in there already. You may need to stop IIS first.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/vs2011.png"><img class="alignnone size-medium wp-image-1153" title="vs2011" src="http://csharpening.net/wp-content/uploads/2012/05/vs2011-300x84.png" alt="" width="300" height="84" /></a></p>
<p>Now you should be able to query to the location:</p>
<p><span style="color: #000080;">http://localhost:7000/MODataSvc/Microsoft.Management.Odata.svc/NetAdapter</span></p>
<p><em>Note that the resource identifier (e.g. NetAdapter) is case sensitive in the beta!</em></p>
<p>Remember there is also an Invoke-RestMethod cmdlet that can be used to query the entities. Using this method, it looks something like this.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/restrequest.png"><img class="alignnone size-medium wp-image-1154" title="restrequest" src="http://csharpening.net/wp-content/uploads/2012/05/restrequest-300x93.png" alt="" width="300" height="93" /></a></p>
<p>I think this is insanely powerful functionality. It seems that the tooling isn&#8217;t quite 100% yet and requires quite a bit of setup to get running but the possibilities are endless. Creating RESTful services from PowerShell modules will be a cinch! I really encourage you to read the whitepaper about this that I mentioned earlier. It contains a ton of information.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://csharpening.net/?feed=rss2&#038;p=1141</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The PowerShell Deep Dive 2012 in San Deigo</title>
		<link>http://csharpening.net/?p=1128</link>
		<comments>http://csharpening.net/?p=1128#comments</comments>
		<pubDate>Thu, 03 May 2012 21:47:14 +0000</pubDate>
		<dc:creator>adamdriscoll</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[PowerShell Deep Dive]]></category>
		<category><![CDATA[TEC2012]]></category>

		<guid isPermaLink="false">http://csharpening.net/?p=1128</guid>
		<description><![CDATA[I&#8217;ve just returned from the PowerShell Deep Dive in San Diego. It was an exciting 3 day event hosted by Quest and sponsored by Microsoft. We had some of the world&#8217;s brightest PowerShell community leaders gathered together along side a whole host of PowerShell enthusiasts. The sessions were very informative and the speakers all did [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-04-28_15-48-32_226.jpg"><img class="alignnone size-medium wp-image-1134" title="2012-04-28_15-48-32_226" src="http://csharpening.net/wp-content/uploads/2012/05/2012-04-28_15-48-32_226-300x169.jpg" alt="" width="300" height="169" /></a></p>
<p>I&#8217;ve just returned from the PowerShell Deep Dive in San Diego. It was an exciting 3 day event hosted by Quest and sponsored by Microsoft. We had some of the world&#8217;s brightest PowerShell community leaders gathered together along side a whole host of PowerShell enthusiasts.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-04-30_07-47-09_325.jpg"><img class="alignnone size-medium wp-image-1130" title="2012-04-30_07-47-09_325" src="http://csharpening.net/wp-content/uploads/2012/05/2012-04-30_07-47-09_325-300x169.jpg" alt="" width="300" height="169" /></a></p>
<p>The sessions were very informative and the speakers all did a great job (I didn&#8217;t mess up too much!). Some of the topics included PowerShell Workflows, Office automation and PowerShell as a web language. There was almost always a lively discussion intertwined with the session that proved to add a lot of value.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-05-01_09-05-53_476.jpg"><img class="alignnone size-medium wp-image-1131" title="2012-05-01_09-05-53_476" src="http://csharpening.net/wp-content/uploads/2012/05/2012-05-01_09-05-53_476-300x169.jpg" alt="" width="300" height="169" /></a></p>
<p>We even had some of the PowerShell team members join us and provide some great insight into decisions surrounding the architecture and scope of the language. Bruce always manages to blow my mind.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-04-30_14-57-03_675.jpg"><img class="alignnone size-medium wp-image-1132" title="2012-04-30_14-57-03_675" src="http://csharpening.net/wp-content/uploads/2012/05/2012-04-30_14-57-03_675-169x300.jpg" alt="" width="169" height="300" /></a></p>
<p>Whenever we had a free slot of time we would work in lighting rounds. This allowed anyone from the audience to give a short (about 5 minute) demonstration or impromptu discussion about anything PowerShell related. This led to some great, unexpected content like<a href="http://psnuget.codeplex.com/"> PS-NuGet</a>.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-04-30_09-01-18_917.jpg"><img class="alignnone size-medium wp-image-1137" title="2012-04-30_09-01-18_917" src="http://csharpening.net/wp-content/uploads/2012/05/2012-04-30_09-01-18_917-169x300.jpg" alt="" width="169" height="300" /></a></p>
<p>We held a script party, a meet the experts session and a birds of a feather session. Every one of these events were really well attended by the PowerShell folk. The lively atmosphere that the PowerShell community brings is just awesome!</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-05-01_20-35-37_947.jpg"><img class="alignnone size-medium wp-image-1133" title="2012-05-01_20-35-37_947" src="http://csharpening.net/wp-content/uploads/2012/05/2012-05-01_20-35-37_947-300x169.jpg" alt="" width="300" height="169" /></a></p>
<p>We also spent a bunch of time just hanging out and even watched Jonathan rock the yo-yo!</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-04-30_21-18-06_127.jpg"><img class="alignnone size-medium wp-image-1135" title="2012-04-30_21-18-06_127" src="http://csharpening.net/wp-content/uploads/2012/05/2012-04-30_21-18-06_127-300x169.jpg" alt="" width="300" height="169" /></a><a href="http://csharpening.net/wp-content/uploads/2012/05/2012-05-01_21-18-33_607.jpg"><img class="alignnone size-medium wp-image-1136" title="2012-05-01_21-18-33_607" src="http://csharpening.net/wp-content/uploads/2012/05/2012-05-01_21-18-33_607-169x300.jpg" alt="" width="169" height="300" /></a></p>
<p>I would call it a success and I can&#8217;t wait for another one! If you want some more of the action, I have a <a href="https://plus.google.com/photos/113547647528657031305/albums/5738418571129656257">Google Photo Album</a> full of pictures I took at TEC2012. I hope that we will see you all at the next PowerShell Deep Dive! If you&#8217;re curious about attending a Deep Dive in the future, please watch <a href="http://www.theexpertsconference.com/">The Experts Conference</a> website.</p>
]]></content:encoded>
			<wfw:commentRss>http://csharpening.net/?feed=rss2&#038;p=1128</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell Deep Dive 2012 &#8211; PowerShell Module</title>
		<link>http://csharpening.net/?p=1120</link>
		<comments>http://csharpening.net/?p=1120#comments</comments>
		<pubDate>Sun, 22 Apr 2012 22:04:05 +0000</pubDate>
		<dc:creator>adamdriscoll</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[quest]]></category>
		<category><![CDATA[TEC2012]]></category>

		<guid isPermaLink="false">http://csharpening.net/?p=1120</guid>
		<description><![CDATA[I&#8217;m getting really excited for the PowerShell Deep Dive this year. We are just about a week away from the festivities! We are excited to welcome Jeff Snover as our keynote along with a whole list of amazing speakers. I thought that I would make it a bit easier to find sessions and speaker information. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m getting really excited for the <a href="http://www.theexpertsconference.com/us/2012/powershell-deep-dive/">PowerShell Deep Dive</a> this year. We are just about a week away from the festivities! We are excited to welcome Jeff Snover as our keynote along with a whole list of amazing speakers. I thought that I would make it a bit easier to find sessions and speaker information. I&#8217;ve created a PowerShell module that can search the various deep dive sessions and look up information about the speakers.</p>
<p><strong>Get-Agenda </strong></p>
<p>The Get-Agenda function will return the agenda for the conference. You can input the date and time, keywords or speaker names.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/04/getagenda.png"><img class="alignnone size-full wp-image-1121" title="getagenda" src="http://csharpening.net/wp-content/uploads/2012/04/getagenda.png" alt="" width="775" height="154" /></a></p>
<p><strong>Get-Speaker</strong></p>
<p>The Get-Speaker function will return all the information about a particular speaker.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/04/getspeaker.png"><img class="alignnone size-full wp-image-1122" title="getspeaker" src="http://csharpening.net/wp-content/uploads/2012/04/getspeaker.png" alt="" width="853" height="228" /></a></p>
<p><strong>Sh0w-Speaker</strong></p>
<p>My personal favorite, Show-Speaker will pop up the speaker&#8217;s picture in your default web browser. Great way to know who&#8217;s who.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/04/showspeaker.png"><img class="alignnone size-full wp-image-1123" title="showspeaker" src="http://csharpening.net/wp-content/uploads/2012/04/showspeaker.png" alt="" width="511" height="283" /></a></p>
<p>The data for the speaker and agenda cmdlets was all gathered off of the TEC2012 website. Hope to see you in San Diego!</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/04/deepdive2012.zip">Deep Dive 2012 Module</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://csharpening.net/?feed=rss2&#038;p=1120</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PowerShell for the Redditor</title>
		<link>http://csharpening.net/?p=1113</link>
		<comments>http://csharpening.net/?p=1113#comments</comments>
		<pubDate>Fri, 20 Apr 2012 02:54:53 +0000</pubDate>
		<dc:creator>adamdriscoll</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[powershell 3.0]]></category>
		<category><![CDATA[reddit]]></category>

		<guid isPermaLink="false">http://csharpening.net/?p=1113</guid>
		<description><![CDATA[I frequent Reddit too much. I&#8217;ve actually started using Rescue Time to clock my time doing wasteful things on the computer. It&#8217;s great. It&#8217;s almost like counting calories; just knowing that you are keeping track makes you want to stay on track. It really keeps you honest. They have all kinds of neat graphs and [...]]]></description>
			<content:encoded><![CDATA[<p>I frequent Reddit too much. I&#8217;ve actually started using <a href="https://rescuetime.com/">Rescue Time </a>to clock my time doing wasteful things on the computer. It&#8217;s great. It&#8217;s almost like counting calories; just knowing that you are keeping track makes you want to stay on track. It really keeps you honest. They have all kinds of neat graphs and you can break down your computer usage by program and even website. Pretty neat!</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/04/rescuetime.png"><img class="alignnone size-medium wp-image-1114" title="rescuetime" src="http://csharpening.net/wp-content/uploads/2012/04/rescuetime-300x156.png" alt="" width="300" height="156" /></a></p>
<p>Most of the time I spend on Reddit is looking at <a href="http://i.imgur.com/nYdBd.png">funny cat pictures</a> but I do enjoy visiting the <a href="http://www.reddit.com/r/programming">Programming </a>and <a href="http://www.reddit.com/r/powershell">PowerShell</a> subreddits. There is a whole host of great information that can be found on both of them. The best (and worst) part is that the content changes <em>hourly. </em>Visiting the site even an hour later can provide new interesting articles to waste my time reading&#8230; Recently, I&#8217;ve been visiting <a href="http://news.ycombinator.com/">Hacker News </a>a lot more because it doesn&#8217;t quite pull me in like Reddit has a tendency to. In an effort to get my /r/PowerShell fix, I created a little cmdlet to return the first page of submissions on any subreddit. Reddit has a really extensive API that returns JSON. PowerShell 3 can easily consume this format and return it as objects. What&#8217;s also cool is the new, terse syntax for enumerating a collection&#8217;s item&#8217;s properties. For example, if I had a list of Sport objects in a collection and the Sport class had a property Name; I could just use the following syntax.</p>
<pre class="syntax">$sports.Name
Football
Baseball
Tennis</pre>
<p>This makes working with a hierarchy-based format like a JSON document really easy. There are typically many nodes that have children that need to be expanded. I utilized the new Invoke-WebRequest cmdlet to query Reddit&#8217;s API and parsed the returned document with the ConvertFrom-Json cmdlet.</p>
<pre class="syntax">function Get-Reddit()
{
    param($Subreddit=&quot;PowerShell&quot;)

    $response = Invoke-WebRequest -Uri &quot;http://www.reddit.com/r/$Subreddit.json&quot;
    $obj = ConvertFrom-Json ($response.Content)
    $obj.Data.Children.Data | Select Title,Score,num_comments,Url,PermaLink
}</pre>
<p>Output from the cmdlet contains the title, score, number of comments, URL and a link to the comments section.</p>
<pre>title : Deleting local profile caches for deleted users.
score : 7
num_comments : 2
url : http://www.reddit.com/r/PowerShell/comments/sia9h/deleting_local_profile_caches_for_deleted_users/
permalink : /r/PowerShell/comments/sia9h/deleting_local_profile_caches_for_deleted_users/

title : Find out if a specified hotfix is installed
score : 3
num_comments : 2
url : http://joeit.wordpress.com/2012/04/09/powershell-function-find-hotfix/
permalink : /r/PowerShell/comments/siig2/find_out_if_a_specified_hotfix_is_installed/

title : Modify Trigger for a Scheduled Task
score : 2
num_comments : 0
url : http://www.reddit.com/r/PowerShell/comments/sioqg/modify_trigger_for_a_scheduled_task/
permalink : /r/PowerShell/comments/sioqg/modify_trigger_for_a_scheduled_task/</pre>
<p>For more information on the Reddit API take a look at their <a href="https://github.com/reddit/reddit/wiki/API">Wiki on Github</a>.</p>
<p>EDIT: The Redditor, <a href="http://www.reddit.com/user/MrPowerScripts">MrPowerScripts</a>, has a module that works with PowerShell 2.0. Here is a <a href="http://www.youtube.com/watch?v=wzptgjo8gUI&amp;feature=youtu.be">video </a>and the link to <a href="https://github.com/MrPowerScripts/PowerScripts/blob/master/Modules/RedditNinja.psm1">Github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://csharpening.net/?feed=rss2&#038;p=1113</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>PowerShell Developer Tip: Debugging COM Objects</title>
		<link>http://csharpening.net/?p=1106</link>
		<comments>http://csharpening.net/?p=1106#comments</comments>
		<pubDate>Mon, 16 Apr 2012 19:21:03 +0000</pubDate>
		<dc:creator>adamdriscoll</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[visual studio 2010]]></category>

		<guid isPermaLink="false">http://csharpening.net/?p=1106</guid>
		<description><![CDATA[Here&#8217;s a simple way to debug and quickly prototype COM objects with Visual Studio and PowerShell. In the Debug section of the project properties for the COM object, just put in the PowerShell executable. For command line arguments you can then specify the New-Object cmdlet to instantiate the COM object.  This is the command line [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a simple way to debug and quickly prototype COM objects with Visual Studio and PowerShell. In the Debug section of the project properties for the COM object, just put in the PowerShell executable. For command line arguments you can then specify the New-Object cmdlet to instantiate the COM object.  This is the command line I&#8217;m using.</p>
<pre>-noexit -Command "$Client = New-Object -ComObject MyProgId"</pre>
<p>Here are my project properties.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/04/propertypages1.png"><img class="alignnone size-medium wp-image-1108" title="propertypages" src="http://csharpening.net/wp-content/uploads/2012/04/propertypages1-300x209.png" alt="" width="300" height="209" /></a></p>
<p>Notice that I have Attach set to No. This was misleading at first, but it sets whether to attach to an already running process. We want to launch a new process. It works successfully with a VC6 COM DLL in my experimentation. I was able to set breakpoints and step through my code with ease.  You have to make sure to register your DLL during the build so that the New-Object finds the correct version.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://csharpening.net/?feed=rss2&#038;p=1106</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerGUI VSX 1.6.1</title>
		<link>http://csharpening.net/?p=1104</link>
		<comments>http://csharpening.net/?p=1104#comments</comments>
		<pubDate>Fri, 13 Apr 2012 23:21:23 +0000</pubDate>
		<dc:creator>adamdriscoll</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[powergui]]></category>
		<category><![CDATA[powerguivsx]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[visual studio 2011]]></category>

		<guid isPermaLink="false">http://csharpening.net/?p=1104</guid>
		<description><![CDATA[In my haste I didn&#8217;t thoroughly test the VSX installation. The 1.6 build won&#8217;t install into VS2011. There is now a 1.6.1 build on CodePlex that will install into Visual Studio. Apologies! http://powerguivsx.codeplex.com/releases/view/86007]]></description>
			<content:encoded><![CDATA[<p>In my haste I didn&#8217;t thoroughly test the VSX installation. The 1.6 build won&#8217;t install into VS2011. There is now a 1.6.1 build on CodePlex that will install into Visual Studio. Apologies!</p>
<p><a href="http://powerguivsx.codeplex.com/releases/view/86007">http://powerguivsx.codeplex.com/releases/view/86007</a></p>
]]></content:encoded>
			<wfw:commentRss>http://csharpening.net/?feed=rss2&#038;p=1104</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PowerGUI VSX 1.6 Alpha &#8211; Visual Studio 2011 Support</title>
		<link>http://csharpening.net/?p=1097</link>
		<comments>http://csharpening.net/?p=1097#comments</comments>
		<pubDate>Wed, 11 Apr 2012 04:32:56 +0000</pubDate>
		<dc:creator>adamdriscoll</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[powergui]]></category>
		<category><![CDATA[powerguivsx]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[visual studio 2011]]></category>

		<guid isPermaLink="false">http://csharpening.net/?p=1097</guid>
		<description><![CDATA[I finally got around to installing Visual Studio 2011 Beta the other day. Personally, I really like it. I know there has been some discussion about the UI. It doesn&#8217;t bother me all that much. I kind of like it. I can see your torches in the distance. The UI is very responsive. That is [...]]]></description>
			<content:encoded><![CDATA[<p>I finally got around to installing <a href="http://www.microsoft.com/visualstudio/11/en-us">Visual Studio 2011 Beta </a>the other day. Personally, I really like it. I know there has been some discussion about the UI. It doesn&#8217;t bother me all that much. I kind of <em>like</em> it. I can see your torches in the distance. <img src='http://csharpening.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>The UI is very responsive. That is what I hated about 2010. It&#8217;s sooooo slow that it&#8217;s painful. Everything seems so snappy in the new version. Simple navigation all the way to debugging and breaking on breakpoints seems refined. I also downloaded the Visual Studio 2011 SDK to see if I could upgrade PowerGUI VSX and wouldn&#8217;t ya know it, it worked like a charm! I really only had to upgrade the VSIX project. All the other ones took advantage of <a href="http://www.hanselman.com/blog/FeaturesNOONENOTICEDInVisualStudio11ExpressBetaForWeb.aspx">round tripping</a>. I think PowerGUI VSX fits nicely in the new UI as well. I just need to find some boring, monochromatic icons.  <img src='http://csharpening.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Here are some screens.</p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/04/powerguivsx_vs11.png"><img class="alignnone size-medium wp-image-1098" title="powerguivsx_vs11" src="http://csharpening.net/wp-content/uploads/2012/04/powerguivsx_vs11-300x187.png" alt="" width="300" height="187" /></a></p>
<p><a href="http://csharpening.net/wp-content/uploads/2012/04/powerguivsx_vs11_21.png"><img class="alignnone size-medium wp-image-1100" title="powerguivsx_vs11_2" src="http://csharpening.net/wp-content/uploads/2012/04/powerguivsx_vs11_21-300x187.png" alt="" width="300" height="187" /></a></p>
<p>My ten minute QA cycle has shown this:</p>
<ul>
<li>Debugging of projects works. It seems to show an error message once but then will work after that.</li>
<li>Project system seems to work</li>
<li>IntelliSense and code completion work</li>
<li>The PowerGUI Console works</li>
<li>Snippets do not seem to work. It hangs the IDE.</li>
</ul>
<p><del>I&#8217;ve marked the release as <a href="http://powerguivsx.codeplex.com/releases/view/85852">Alpha </a>and pushed to CodePlex.</del> <a href="http://powerguivsx.codeplex.com/releases/view/86007">Alpha 2</a> has been pushed. For you who are following the<a href="http://powerguivsx.codeplex.com/SourceControl/list/changesets"> source code</a>, there is a new branch for the VS11. I would love to hear feedback. Happy PowerShelling!</p>
]]></content:encoded>
			<wfw:commentRss>http://csharpening.net/?feed=rss2&#038;p=1097</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Healthy Programming</title>
		<link>http://csharpening.net/?p=1091</link>
		<comments>http://csharpening.net/?p=1091#comments</comments>
		<pubDate>Sat, 07 Apr 2012 18:43:51 +0000</pubDate>
		<dc:creator>adamdriscoll</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[diet]]></category>
		<category><![CDATA[exercise]]></category>
		<category><![CDATA[health]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://csharpening.net/?p=1091</guid>
		<description><![CDATA[I sit down a lot. I&#8217;m in front of a computer for at least 8 hours a day. With a book in the hopper, a presentation, blogging and work I find my self in front of the computer even more. Being so sedentary makes it very important to maintain healthy habits to ensure that I don&#8217;t fall [...]]]></description>
			<content:encoded><![CDATA[<p>I sit down <strong>a lot</strong>. I&#8217;m in front of a computer for at least 8 hours a day. With a book in the hopper, a presentation, blogging and work I find my self in front of the computer even more. Being so sedentary makes it very important to maintain healthy habits to ensure that I don&#8217;t fall into poor health. There has been a lot of research that suggests that sitting down all day is <a href="http://mashable.com/2011/05/09/sitting-down-infographic/">horrible </a>for you. Additionally, we all know the <a href="http://www.cdc.gov/healthyweight/effects/index.html">effects </a>of being overweight or obese. I&#8217;ve put a lot of effort into maintaining a healthy diet, exercising and getting my computer time in.</p>
<h2>Diet</h2>
<p><a href="http://www.thinkgeek.com/interests/giftsunder20/e5a7/"><img class="alignnone" title="Unicorn Meat" src="http://www.thinkgeek.com/images/products/frontsquare/e5a7_canned_unicorn_meat.jpg" alt="" width="300" height="300" /></a></p>
<p>Having a healthy diet is the most important part of healthy programming. If you maintain a poor diet, no matter how much you exercise you will not counter act the affects of the poor diet. Additionally, a poor diet makes it really hard to exercise long or hard enough to maintain an optimal weight. I&#8217;m one of the laziest people when it comes to eating. Don&#8217;t get me wrong, I love to eat. But I just hate making food. I often find myself eating crap rather than a meal because I don&#8217;t want to put the effort into cooking, or even preparing, food. I mean, I have important things to do, I don&#8217;t have time for that!</p>
<p>Healthy food is a habit. Your body will adapt to eating healthy. When you eat crap, you will feel like crap. I often will even feel like crap the next day. Finding time to eat healthy is all mental. I can sacrifice that 20 minutes I&#8217;ll spend on Reddit to make one of the more satisfying salads imaginable. Here are some of the rules I use to keep a healthy diet.</p>
<h3>Cook on Sundays</h3>
<p>When I say cook, I mean throw together some spaghetti. <strong>Lots of it</strong>. Package into single meals and that you can just grab and throw in the microwave. It&#8217;s much more satisfying to eat left over spaghetti than a bag of Doritos. Some other meal ideas include chili and pulled pork sandwiches. These types of things reheat well and will last all week. A slow cooker can be your best friend. Just throw a bunch of veggies, some steak or other beef and let it cook all day. You&#8217;ll have 6 or 7 meals available to quickly reheat.</p>
<h3>Smoothie Breakfast</h3>
<p>I know it&#8217;s hard to get up and eat a good breakfast. I need to get to work to get all the stuff I didn&#8217;t get done yesterday! In 5 minutes in the morning I can make a smoothie that contains nearly 60 grams or protein and almost 800 calories. I&#8217;ve found that I don&#8217;t even need to drink coffee in the morning when I have a meal like this! The calories seem high but it will easily sustain you until lunch. If that doesn&#8217;t convince you, just try looking up some of the fast food meal sizes. Here&#8217;s the smoothie recipe I&#8217;ve been using this week. I usually switch up the fruits for something different.</p>
<ul>
<li>1 Cup Lowfat Yogurt, whatever flavor (Greek yogurt is even better but its pretty expensive and makes my mouth itch)</li>
<li>1 Cup Fat Free Milk</li>
<li>10 Ice Cubes</li>
<li>1-2 Cups Frozen Strawberries</li>
<li>2 Scoops Protein Powder</li>
<li>1 Carrot (Sometimes but it definitely adds it&#8217;s own taste to the smoothie)</li>
</ul>
<p>It tastes amazing (if you leave out the carrot), it costs almost nothing and I&#8217;m physically pumped to start my day. It also takes about 5 minutes.</p>
<h3>Keep Crap out of the Kitchen</h3>
<p>Sometimes (more often than it should be) I do not want to cook or I convince myself I don&#8217;t have time to. I take the easy way out and find something in the freezer to microwave or eat a bowl of cereal. If you know you&#8217;re this type of person (don&#8217;t lie!) you just need to not buy crap. Don&#8217;t buy chips, cookies, or crackers. It&#8217;s amazing how many of them you can eat before those fish sticks are done heating up in the oven.</p>
<p>I&#8217;ve already pointed out some good foods that you can easily make and eat all week. But what about snacking? What if the bigwig is in town and you&#8217;re going out to dinner? Eating the right things and the correct <strong>portion </strong>of the right things is very important.</p>
<h3>Portion Control</h3>
<p>Looking to lose weight? This is all you have to know. As long as you consume less calories than you burn, you will lose weight. Plain and simple. Keep in mind that you need to achieve a deficit of <a href="http://tucsoncitizen.com/living-thin/2010/06/05/myth-buster-3500-calories-in-a-pound-are-all-calories-created-equally/">3500 calories to lose a pound</a>. I don&#8217;t keep boxes or bags of crackers or chips in my cube. I will literally eat the entire thing throughout the day. Do you KNOW how many calories are in a box of crackers? Keep a small bag to snack on.</p>
<p>I personally have a hard time controlling myself when going out to dinner or lunch. I bought this food I might as well eat <strong>ALL OF IT</strong>. I recently went out with a coworker and his trick is to immediately portion his meal down to something manageable. No one loves feeling overly stuffed anyways. This is a great idea! He just had the waitress bring out a box and threw it in right away. Out of sight, out of mind.</p>
<h3>Avoid Carbs</h3>
<p>Carbs aren&#8217;t the devil. I love carbs. But I love carbs too much. Carbs are always satisfying and convenient. Chips, crackers, cookies, pasta! Yum. Use a calorie counter thingy. I use the <a href="http://www.fatsecret.com/connected/android">FatSecret </a>one for Android. It&#8217;s totally awesome. They have a nifty barcode scanner, all kinds of predefined restraunts and foods and it breaks down your calories by type. It almost makes it fun to track your food (<em>almost</em>). I can, at a glance, see how many carbs, protein and fat that I&#8217;ve taken in throughout a day. It&#8217;s really easy to eat like 75% carbs. If you bring it down to a resonable 30\30\30 you are doing it right. It usually hard to get the protein that high, hence the 800 calorie protein smoothie. <img src='http://csharpening.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<h3>Beer!</h3>
<p>I&#8217;m a beeroholic. I love a good IPA or Lager. I&#8217;m real stuck on <a href="http://www.aleasylum.com/">Ale Asylum</a> here in Madison at the moment. I always have a new six pack on hand in case I&#8217;ve <strong>earned</strong> a beer. I earn beers too often&#8230;</p>
<p>Drinking is, again, all about portions. I&#8217;m not one for light beers so I&#8217;m not going to pitch that. Just remember the beer you drank two days probably had about 150 calories in it. Now run on a tredmil for awhile and try to burn that off. You&#8217;ll think about that the next time you sit down to that beer you earned.</p>
<h2><strong>Exercise</strong></h2>
<p><img class="alignnone" title="Dynamite" src="http://www.regrettablesincerity.com/wp-content/uploads/2009/01/napoleon_dynamite_xl_03-film-A.jpg" alt="" width="400" height="300" /></p>
<p>Everybody loves to exercise right!  <a href="http://i.qkme.me/3oofy2.jpg">Redicoulsly Photogenic Guy</a> sure does but not me. I don&#8217;t photograph that well or love running as much as that guy. I&#8217;m a programmer. If I loved to run I wouldn&#8217;t sit in a front of a computer all the time. I actually have to convince myself to go to the gym a lot. There are some things though that make going to the gym easier after a long hard day of typing. I mean, I&#8217;m tired damn it!</p>
<h3>Make it a habit</h3>
<p>Blah, blah, blah everyone says that, Adam. I know, I know but this is by far the most important thing for me. If I don&#8217;t go for a couple days, it&#8217;s much easier to not go for a couple more. If I go everyday I feel shame when I don&#8217;t go.</p>
<h3>Eat a late snack</h3>
<p>This is another really important thing for me. If I don&#8217;t eat something late in the afternoon I find myself drained. This makes it much easier to avoid the gym. Eat a nature valley bar or something. This is usually a good time to not avoid carbs.</p>
<h3>Gyms are scary!</h3>
<p>Gyms are super awkward. Everybody is looking at everybody for all kinds of reasons. Most of the time it&#8217;s because they are thinking&#8230;man is that guy looking at me. Everyone is just as uncomfortable as you are. I have been going quite regularly for the last 5 years and still walk in there thinking that body building dude is making fun of my bench press form.</p>
<p>You have to learn not to care. Don&#8217;t worry about impressing girls or doing something embarrising. You&#8217;ll have you&#8217;re moment of embarrassment (I usually do about once a week) and it isn&#8217;t the place to try and get a date anyways.</p>
<h3>Lift Weights</h3>
<p>Lifting weights is really important. You will <a href="http://www.fitforcombatsystem.com/math-and-science-how-weightlifting-burns-fat/">burn far more calories from lifting weights</a> than you will do cardio. This is because when your muscles are in recovery from lifting they are still burning calories. You can burn calories for like a day without doing anything!</p>
<p>You don&#8217;t have to start thinking <a href="http://www.topin24.com/wp-content/uploads/2011/10/Arnold-Schwarzenegger-Pictures-2.jpg">Terminator </a>style or anything. Start small and work into some complex exercises. Complex exercises (think bench press) work more muscles than the isolated ones (think bicep curl).  Learning to lift weights will take a lot of practice. It&#8217;s not easy and it <strong>is </strong>easy to hurt yourself. Get a training session once or twice to learn the ropes.</p>
<p>The best resource I&#8217;ve found, because I don&#8217;t like talking to people, is <a href="http://www.bodybuilding.com/exercises/">Bodybuilding.com</a>. It has a huge catalog of exercises or particular muscles and how to do them.</p>
<h3>Treat Your Heart Right</h3>
<p>Sitting are day does not make your heart stronger. I know it might seem like drinking 10 energy drinks does but unfourtanely that isn&#8217;t the case. Running is a great way to work out the heart. Tredmils don&#8217;t do it justice though. Try running outside. It&#8217;s much harder and you don&#8217;t have to go to that smelly gym and listen to Justin Bieber for a half hour.</p>
<p>Running a lot can be taxing on your joints. I like to do a lot of rowing but that requires purchasing some head phones to block out the Bieber.</p>
<h3>Motivation</h3>
<p>Again, finding motivation is the hardest part of going to the gym or exercising. Sign up for a sport. Find a coworker that you can exercise with. Currently, I&#8217;m not exercising with a partner but it is really the best motivation I&#8217;ve found. Second to that is finding someone to talk to about exercising. Even if you don&#8217;t go with someone to the gym, talking about what new exercises you tried or maybe how weird that body builder guy was looking at you will be that little bit of extra encouragement to get you in the gym.</p>
<h2>Everyday Things</h2>
<p>In addition to keeping a healthy diet and regular exercise, you can mix in some things into your day that will make you healthier.</p>
<h3>Take the long way</h3>
<p>I park at the end of the parking lot. I walk about 7 flights of stairs to go to the bathroom. When I&#8217;m architecting that new piece of code, I find an empty conference room to <strong>stand </strong>and do it (I&#8217;m not one for the standing desk). I get up and talk to my coworkers rather than sending them an IM. It&#8217;s more personal and I might have to walk that extra 100 feet.</p>
<h3>Sleeping</h3>
<p><img class="alignnone" title="Social Network" src="http://cache.jezebel.com/assets/images/39/2011/10/medium_social_network_coding1018.jpg" alt="" width="300" height="199" /></p>
<p>Programmers are really bad at sleeping. I&#8217;ll get into a problem and all of a sudden it&#8217;s 2 AM and I have a meeting at 9. This isn&#8217;t healthy. You just need to train yourself to walk away. The glamour of building all night long to create the next Facebook is often a driver for me. Usually the code can wait. Your mind will be fresh and the solution will probably be 10x simpler than you thought. Sleeping also helps build muscle and lose weight.</p>
<h3>Other Good Resources</h3>
<ul>
<li><a href="http://www.hanselman.com/blog/BrainBytesBackBunsTheProgrammersPriorities.aspx">Great Post by Scott Hanselman about some healthy things</a></li>
<li><a href="http://www.bodybuilding.com/">Bodybuild.com has great protein powder, tons of exercises and some good motivation</a></li>
<li><a href="http://www.reddit.com/r/exercise">Reddit/r/Exercise</a></li>
<li><a href="http://www.reddit.com/r/nutrition">Reddit/r/Nutrition</a></li>
<li><a href="http://fitness.stackexchange.com/">StackExchange Fitness</a></li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://csharpening.net/?feed=rss2&#038;p=1091</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>MadPosh Meeting Tonight &#8211; Script Club</title>
		<link>http://csharpening.net/?p=1087</link>
		<comments>http://csharpening.net/?p=1087#comments</comments>
		<pubDate>Tue, 03 Apr 2012 17:01:51 +0000</pubDate>
		<dc:creator>adamdriscoll</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[madposh]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[powershell 3.0]]></category>

		<guid isPermaLink="false">http://csharpening.net/?p=1087</guid>
		<description><![CDATA[We are holding a Script Club style meeting tonight. Meet us at 5:30 at Wipfli to look over scripts and explorer some tips and tricks. If you don&#8217;t have a script to bring, just come and join in the party! What&#8217;s a script club? This is an informal gathering to look over scripts that people [...]]]></description>
			<content:encoded><![CDATA[<p>We are holding a Script Club style meeting tonight. Meet us at 5:30 at Wipfli to look over scripts and explorer some tips and tricks. If you don&#8217;t have a script to bring, just come and join in the party! </p>
<p><strong>What&#8217;s a script club? </strong></p>
<p>This is an informal gathering to look over scripts that people are either struggling with or that they think is cool. I&#8217;ll bring along some tips and tricks to share with the group if time allows. For all the information, head over to the <a href="http://madposh.wordpress.com/">MadPosh </a>site.  Hope to see you there!</p>
<p><img src="http://madposh.files.wordpress.com/2011/11/madposh.png" alt="MadPosh" /></p>
]]></content:encoded>
			<wfw:commentRss>http://csharpening.net/?feed=rss2&#038;p=1087</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

