<?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>Ben McCormack</title>
	<atom:link href="http://benmccormack.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://benmccormack.com</link>
	<description>Becoming a better version of myself</description>
	<lastBuildDate>Tue, 13 Apr 2010 12:19:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Diving into jQuery, Part 1: A Simple Currency Converter &#8211; ASP.NET and jQuery</title>
		<link>http://benmccormack.com/?p=236</link>
		<comments>http://benmccormack.com/?p=236#comments</comments>
		<pubDate>Tue, 13 Apr 2010 12:05:33 +0000</pubDate>
		<dc:creator>Ben McCormack</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://benmccormack.com/?p=236</guid>
		<description><![CDATA[
A few weeks ago, I picked up a copy of Matthew MacDonald’s Beginning ASP.NET 2.0 in VB 2005 since I needed to learn ASP.NET for work.&#160; Since we’re currently using the 2.0 version of the .NET framework, I decided to go with an older book (five years!!) now and plan to refresh with newer material [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.amazon.com/gp/product/1590596218?ie=UTF8&amp;tag=benmccom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1590596218"><img src="http://ecx.images-amazon.com/images/I/517b%2Bnk2vSL.jpg" width="181" height="240" /></a></p>
<p>A few weeks ago, I picked up a copy of Matthew MacDonald’s <a href="http://www.amazon.com/gp/product/1590596218?ie=UTF8&amp;tag=benmccom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1590596218">Beginning ASP.NET 2.0 in VB 2005</a> since I needed to learn ASP.NET for work.&#160; Since we’re currently using the 2.0 version of the .NET framework, I decided to go with an older book (five years!!) now and plan to refresh with newer material if/when we switch to .NET 4.0, which was just released yesterday.</p>
<p>It’s amazing how much has happened with web and general computer technologies since this book was published.&#160; At the time, AJAX was still largely just a concept, Windows Vista had not yet been released, and the iPhone was still a unicorn in Steve Jobs’ backyard.&#160; Perhaps the age of this book gives reason to why I was surprised at the how much enthusiasm the author had for not needing to worry about HTML or JavaScript and let the server do all of the work.</p>
<p>To be sure, I can certainly understand why developers, who survived the world of classic ASP and VBScript, were excited when ASP.NET came along, complete with its features of state management, server and client-side validation, and a host of other niceties which were revolutionary for its time.&#160; Besides, when the dust from the browser wars of the late nineties was settling, who in their right mind wanted to write code for the <em>browser</em>?&#160; Eck.</p>
<p>Times have changed, however, and web developers can reasonably expect client browsers to handle JavaScript (which they were supposed to be able to handle since the late nineties).&#160; So when I came across MacDonald’s example of a simple currency converter in chapter 5 of his book, I was little surprised that it was entirely in ASP.NET.&#160; Granted, this a book focused <em>entirely</em> on ASP.NET, but as I worked through the example, the idea of creating even a simple currency converter to run using server-side code seemed so dated.&#160; Why make a full-round trip back to the server when all you need to do is a simple calculation?</p>
<p>I wanted to try using JavaScript to accomplish the same task.&#160; I decided to user <a href="http://www.jquery.com">jQuery</a>, a popular JavaScript library, to help me complete the task.&#160; You can see a working demo of my <a href="http://benmccormack.com/demo/currency-converter-two-ways/">jQuery-converted currency converter here</a>.</p>
<p>To get started with jQuery, you need to add a reference to the jQuery source file in the header of either your HTML or ASPX file.&#160; Microsoft hosts jQuery on its content delivery network (cdn), so I simply linked to their most recent version of the file that included visual studio documentation (hence the –vsdoc in the file name).&#160; I also put all of my jQuery and JavaScript code in a Default.js file, so you’ll see that link as well:    </p>
<p>&#160;</p>
<pre class="brush: xml;">
&lt;head&gt;
  &lt;title&gt;Currency Converter&lt;/title&gt;

    &lt;script src=&quot;http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.1-vsdoc.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;scripts/Default.js&quot;  type=&quot;text/javascript&quot; &gt;&lt;/script&gt;

&lt;/head&gt;
</pre>
<p>The beginning part of my Default.js file contains a lot of code to get the page ready to handle certain events.  Everything is contained in the $(document).ready event and I have separate events for the buttons (Convert and ShowGraph) as well the change event on the currency selector.  I also included a toggle option to choose to run the page as ASP.NET or jQuery.  If ASP.NET is chosen, all of the JavaScript is basically ignored.  If jQuery is chosen, the code is executed when the events fire and the even.PreventDefault() command executed.  This code will prevent something like a button from submitting form data if that&#8217;s its default behavior.</p>
<pre class="brush: jscript;">
$(document).ready(function() {
  $(&quot;#Convert&quot;).click(function(event) {
    ShowConversionResult();
    ShowGraph();
    if ($(&quot;#jqueryToggle&quot;).val() * 1) {
      event.preventDefault();
    }
  });
  $(&quot;#Currency&quot;).change(function(event) {
    ShowConversionResult();
    ShowGraph();
  });
  $(&quot;#ShowGraph&quot;).click(function(event) {
    ShowGraph();
    if ($(&quot;#jqueryToggle&quot;).val() * 1) {
      event.preventDefault();
    }
  });
});
</pre>
<p>Here is the ShowConversionResult() function.&#160; You’ll see a few things going on here.&#160; This was a good opportunity for me to learn basic dynamic typing using JavaScript and learn some tricks for dealing with numbers and testing conditions.&#160; I also learned a little about CSS styling using jQuery.</p>
<pre class="brush: jscript;">
function ShowConversionResult() {
  if ($(&quot;#jqueryToggle&quot;).val() * 1) {
    var oldAmount = $(&quot;#US&quot;).val() * 1;
    if (isNaN(oldAmount))
      oldAmount = 0;
    if (oldAmount &lt;= 0) {
      $(&quot;#Result&quot;).css(&quot;color&quot;, &quot;red&quot;).text(&quot;Specify a positive number&quot;);
    }
    else {
      $(&quot;#Result&quot;).css(&quot;color&quot;, &quot;black&quot;);
      var newAmount = oldAmount * $(&quot;#Currency&quot;).val();
      $(&quot;#Result&quot;).text(oldAmount.toFixed(2) + &quot; U.S. dollars = &quot; + newAmount.toFixed(2) + &quot; &quot; +
            $(&quot;#Currency :selected&quot;).text());
    }
  }
}
</pre>
<p>Here’s the ShowGraph() function of my code.&#160; This part was interesting because the ASP.NET example starts with the graph image disabled when the page loads.&#160;&#160; When an element is disabled in ASP.NET, no HTML code will be produced for that element unless the control is enabled on a post-back, which is exactly how the ASP.NET application functions.&#160; However, I wanted to solve this problem using jQuery, so I needed to be able to work with the Graph element even if it did not yet exist.</p>
<p>The line of code that says “if ($(&quot;#Graph&quot;).length != 0) {“ is testing for the existence of the Graph element.&#160; If it exists, it simply changes the source attribute of the element and the new graph is loaded.&#160; If not, it dynamically generates HTML for the graph element and appends it to the “GraphContainer” div tag (which I had to create in order for this to work; it wasn’t part of the original ASP.NET solution).</p>
<pre class="brush: jscript;">
function ShowGraph() {
  if ($(&quot;#jqueryToggle&quot;).val() * 1) {
    var src = &quot;pic&quot; + $(&quot;#Currency&quot;).attr(&quot;selectedIndex&quot;) + &quot;.png&quot;
    //Test to see if the Graph element exists:
    if ($(&quot;#Graph&quot;).length != 0) {
      $(&quot;#Graph&quot;).attr(&quot;src&quot;, src)
    }
    else {
      var html = &quot;&lt;img src=\&quot;&quot; + src + &quot;\&quot; alt=\&quot;Currency Graph\&quot; id=\&quot;Graph\&quot; /&gt;&quot;
      $(&quot;#GraphContainer&quot;).append(html)
    }
  }
}
</pre>
<p>Overall, this was a fun project to learn some of the basics of jQuery while at the same time learning ASP.NET.&#160; JavaScript can make for a richer user experience for the client and jQuery certainly makes for a better experience for the developer.  My next post will show how to hack an existing page using jQuery to make images load dynamically instead of making a full trip to the server.</p>
]]></content:encoded>
			<wfw:commentRss>http://benmccormack.com/?feed=rss2&amp;p=236</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pay Me! Easily Accept Money on Your Website</title>
		<link>http://benmccormack.com/?p=232</link>
		<comments>http://benmccormack.com/?p=232#comments</comments>
		<pubDate>Sat, 03 Apr 2010 17:28:36 +0000</pubDate>
		<dc:creator>Ben McCormack</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://benmccormack.com/index.php/2010/04/pay-me-easily-accept-money-on-your-website/</guid>
		<description><![CDATA[I&#8217;ve been playing around with PayPal to try to learn ways that people can send other people money over the internet.&#160; For my own personal projects, I have zero interest in learning credit card handling myself, so PayPal makes it easy enough to transfer money from one individual to another (albeit for a small fee).
PayPal [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with PayPal to try to learn ways that people can send other people money over the internet.&#160; For my own personal projects, I have zero interest in learning credit card handling myself, so PayPal makes it easy enough to transfer money from one individual to another (albeit for a small fee).</p>
<p>PayPal has several fairly customizable options for giving users an opportunity to send money on a web site.&#160; Even with their simple “button” feature, I was surprised at how much customization you could do.&#160; You can easily create buttons to “Buy Now,” “Subscribe,” “Donate,” and even “Add to Cart.”&#160; Some of the buttons even allow you to specify purchasing options for an item.&#160; For example, you could have a button with “Small,” “Medium,” and “Large,” with each option having a separate checkout price.</p>
<p>To try it out, I decided to make a custom button for my website.&#160; I chose the “Donation” button, which allows the buyer to specify the amount of money they wish to send to me.&#160; I didn’t really want to use the word “Donate,” so I copied their default Donate button into <a href="http://www.getpaint.net/">Paint.NET</a> and edited out “Donate” and added “Pay Me!”</p>
<p>I also added a custom header to the checkout page so it (somewhat) matches my blog theme.&#160; However, because the image is hosted in a non-https domain, users may see an error that some of the content being loaded did not come from a secure source.&#160; I’ll live.</p>
<p>Collecting money via <a href="http://www.paypal.com">PayPal</a> is super easy.&#160; If you want to see the fruits of my labors, check out the <a href="http://benmccormack.com/index.php/pay-me/">“Pay Me!”</a> section of my website.</p>
<p><a href="http://benmccormack.com/index.php/pay-me/"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://benmccormack.com/wp-content/uploads/2010/04/image.png" width="484" height="241" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://benmccormack.com/?feed=rss2&amp;p=232</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An Everything-Glazed Lunch: A HoneyBaked Krispy Kreme Sandwich</title>
		<link>http://benmccormack.com/?p=225</link>
		<comments>http://benmccormack.com/?p=225#comments</comments>
		<pubDate>Sun, 28 Mar 2010 18:19:19 +0000</pubDate>
		<dc:creator>Ben McCormack</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://benmccormack.com/index.php/2010/03/an-everything-glazed-lunch-a-honeybaked-krispy-kreme-sandwich/</guid>
		<description><![CDATA[&#160;
Since my new job began a month ago, I’ve been trying to experiment with the World&#8217;s Best Ham and try it in different food combinations.&#160; After picking up a box of Krispy Kreme doughnuts last night, I was intrigued by the fact that a Krispy Kreme doughnut is basically bread covered in a sugar glaze:
 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://benmccormack.com/wp-content/uploads/2010/03/IMG_8923.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="HoneyBaked Krispy Kreme Sandwich" border="0" alt="HoneyBaked Krispy Kreme Sandwich" src="http://benmccormack.com/wp-content/uploads/2010/03/IMG_8923_thumb.jpg" width="384" height="361" /></a>&#160;</p>
<p>Since my new job began a month ago, I’ve been trying to experiment with the <a href="http://www.honeybakedonline.com" target="_blank">World&#8217;s Best Ham</a> and try it in different food combinations.&#160; After picking up a box of Krispy Kreme doughnuts last night, I was intrigued by the fact that a Krispy Kreme doughnut is basically bread covered in a sugar glaze:</p>
<p><a href="http://benmccormack.com/wp-content/uploads/2010/03/IMG_8920.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="The World&#39;s Best Doughnut" border="0" alt="The World&#39;s Best Doughnut" src="http://benmccormack.com/wp-content/uploads/2010/03/IMG_8920_thumb.jpg" width="304" height="204" /></a> </p>
<p>HoneyBaked Ham is basically a ham (well, not<em> just</em> a ham; this is the World’s Best Ham that we’re talking about here) covered in a sugar glaze (can’t you just taste the crunch? yum…)</p>
<p><a href="http://benmccormack.com/wp-content/uploads/2010/03/IMG_8921.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="The World&#39;s Best Ham" border="0" alt="The World&#39;s Best Ham" src="http://benmccormack.com/wp-content/uploads/2010/03/IMG_8921_thumb.jpg" width="304" height="204" /></a> </p>
<p>A sandwich, to be overly generalistic, is simply two pieces of bread with a piece of meat in between.&#160; So what do you get when you take two <em>glazed</em> pieces of bread and put a <em>glazed</em> piece of meat in between? I present to you the <strong>HoneyBaked Krispy Kreme Sandwich</strong>:</p>
<p><a href="http://benmccormack.com/wp-content/uploads/2010/03/IMG_8924.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="The sandwich, squished and ready to eat" border="0" alt="The sandwich, squished and ready to eat" src="http://benmccormack.com/wp-content/uploads/2010/03/IMG_8924_thumb.jpg" width="304" height="183" /></a> </p>
<p>To be honest, I thought that combining the World’s Best Ham with the World’s Best Doughnut (IMHO) could possibly make the World’s Best Sandwich.&#160; It turns out that there’s just a <em>little</em> too much sugar in this culinary concoction as it hides the natural tastiness of the ham.&#160; Perhaps this would make a nice treat at state fairs and southern weddings.</p>
<p>While my final verdict for the sugary sandwich is only a C+, I still enjoyed the experiment and it made for a nice high-calorie Sunday brunch.</p>
<p><a href="http://benmccormack.com/wp-content/uploads/2010/03/IMG_8928.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Yummm!" border="0" alt="Yummm!" src="http://benmccormack.com/wp-content/uploads/2010/03/IMG_8928_thumb.jpg" width="254" height="244" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://benmccormack.com/?feed=rss2&amp;p=225</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Finding a Job the Unconventional Way</title>
		<link>http://benmccormack.com/?p=212</link>
		<comments>http://benmccormack.com/?p=212#comments</comments>
		<pubDate>Tue, 23 Feb 2010 04:08:40 +0000</pubDate>
		<dc:creator>Ben McCormack</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://benmccormack.com/index.php/2010/02/finding-a-job-the-unconventional-way/</guid>
		<description><![CDATA[
Sometime at the end of last summer, I was sharing with my newlywed wife that I wanted to transition into a career as a software developer.  With no professional background in programming and only being able to put on a resume what I’ve taught myself in Excel and Access VBA code, a little HTML, and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://benmccormack.com/wp-content/uploads/2010/02/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://benmccormack.com/wp-content/uploads/2010/02/image_thumb.png" border="0" alt="image" width="244" height="157" /></a></p>
<p>Sometime at the end of last summer, I was sharing with my newlywed wife that I wanted to transition into a career as a software developer.  With no professional background in programming and only being able to put on a resume what I’ve taught myself in Excel and Access VBA code, a little HTML, and some SQL, deciding to find a job as a developer was no small endeavor. </p>
<p>With the encouragement of a friend, I decided to start learning Silverlight and even <a href="http://benmccormack.com/index.php/2009/08/silverenlightening-is-born/">blogged about my learning</a> (the post originated at Silverenlightening.com and has been ported here).  I read tons of blog posts that focused on Silverlight and software development in general.  I tried reading a book on Silverlight and when I realized that Silverlight was over my head because of my lack of programming experience, I bought a <a href="http://www.amazon.com/gp/product/1590599543?ie=UTF8&amp;tag=benmccom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1590599543">book on C#</a> and got some <a href="http://benmccormack.com/index.php/2010/01/using-project-euler-to-learn-a-programming-language/">great practice over at ProjectEuler.net</a>.  I went to several different users groups each month that focused on Microsoft technologies.   I started using new technologies at work to leverage the power and flexibility of the more advanced programming frameworks.  I asked lots of questions and even provided a few answers over at <a href="http://www.stackoverflow.com">StackOverflow.com</a>, an online community where programmers can ask questions to other programmers.  <strong>And I started following lots of software developers on Twitter</strong>.</p>
<p>I wasn’t planning on searching for a new job until the summer of 2010.  I figured that a year of practice and learning would put me in a good position to enter the market for a job as a junior software developer.  That was until I saw this tweet from the CEO of Fog Creek Software announcing a job for a support engineer:</p>
<p><a href="http://benmccormack.com/wp-content/uploads/2010/02/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://benmccormack.com/wp-content/uploads/2010/02/image_thumb1.png" border="0" alt="image" width="562" height="272" /></a></p>
<p>“Fog Creek? I can’t work there,” I initially thought, “they only hire the best and brightest developers on the planet!” As I read through the job description, I realized that I didn’t have to be a professional software developer to support professional software.  I just had to be smart and able to solve problems. Great!</p>
<p>I completed my first resume that evening, which led to a phone interview with the head of technical support at Fog Creek.  That interview went really well and eventually I was invited to New York for an in-person interview.  Although I wasn’t offered a job, the whole interview process was wonderful and I left New York with tons of confidence that I could find a new job, even with my limited background in the field of software development.</p>
<p>I continued to do the same things I was doing before going to New York: reading blogs, practicing programming, going to users groups, <strong>and keeping my eye on Twitter</strong>.  While I usually don’t pay much attention to when people I don’t know follow me on Twitter, when <a href="http://twitter.com/KellyITJobs">Kelly Thielemann</a> started following me on Twitter, I decided to follow her as well.  I didn’t know much about her other than the fact that she was a recruiter for Matrix, a company I had heard about after going to the .NET users group, she tweeted about new jobs every now and then, and I’m pretty sure she went to my high school (though not a requirement when following someone on twitter, I’m more likely to follow someone local than someone halfway around the planet if they’re following me for marketing or sales reasons).</p>
<p>When I think back on it, I’m not sure what inspired me to click on the following tweet:</p>
<p><a href="http://benmccormack.com/wp-content/uploads/2010/02/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://benmccormack.com/wp-content/uploads/2010/02/image_thumb2.png" border="0" alt="image" width="565" height="221" /></a></p>
<p>Sure, Java is <em>similar to </em>C#, but I’m by no means a “Java dev.” Maybe it was the “Jr” part of the job that made me click through (if I’m <em>anything</em> in the world of software development, I’m certainly <em>junior</em>).  The job description seemed like it might be similar to the Fog Creek job, so I figured it wouldn’t hurt to send in my resume.</p>
<p>The senior recruiter at Matrix who reviewed my resume saw very quickly that I wasn’t a good fit for the Java job (you actually had to <em>know</em> Java; who knew?).  However, she suggested another opportunity for a junior development position at HoneyBaked Ham Company.  It sounded like a great job that would provide a way to begin a career as a software developer, so I decided to pursue it.</p>
<p>The phone interview went really well and that led very quickly to an in-person interview.  After meeting with their lead developer and VP of IT, I felt very strongly that this job would be a great fit for me and was really hoping for an offer.  While waiting a few days to hear back from Matrix after the interview, I felt like I was dating again; I thought the anxious feeling wondering if the other person was going to call wouldn’t be an issue anymore when I got married.  Thankfully, I heard back from Matrix and received an offer!</p>
<p>After discussing the offer with my wife, I accepted the job and will start at HoneyBaked on March 1st.  I’m amazed at how things lined up so that I was able to get connected with HoneyBaked.  I followed blogs, networked at users groups, and kept up with industry trends on Twitter.  I didn’t go to any job fairs, use jobs-centered websites, or really do any of the conventional things that people do to look for jobs.  I guess that in today’s market, it doesn’t hurt to be a little unconventional.</p>
]]></content:encoded>
			<wfw:commentRss>http://benmccormack.com/?feed=rss2&amp;p=212</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Using Twitter to Find a Job</title>
		<link>http://benmccormack.com/?p=203</link>
		<comments>http://benmccormack.com/?p=203#comments</comments>
		<pubDate>Thu, 18 Feb 2010 20:46:05 +0000</pubDate>
		<dc:creator>Ben McCormack</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://benmccormack.com/?p=203</guid>
		<description><![CDATA[I&#8217;ve been meaning to write up a post about my success in finding a job to begin my career in software development. Matrix, the staffing/recruiting company I worked with to find the job, wrote up a post about how I used Twitter to find a job. Check it out!
Using Twitter to Find a Job – [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been meaning to write up a post about my success in finding a job to begin my career in software development. Matrix, the staffing/recruiting company I worked with to find the job, wrote up a post about how I used Twitter to find a job. Check it out!</p>
<p><a href="http://matrixresourcesblog.com/2010/02/23/using-twitter-to-find-a-job-a-real-life-example/">Using Twitter to Find a Job – A Real Life Example</a></p>
]]></content:encoded>
			<wfw:commentRss>http://benmccormack.com/?feed=rss2&amp;p=203</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Valentine&#8217;s Day Letter To My Wife</title>
		<link>http://benmccormack.com/?p=201</link>
		<comments>http://benmccormack.com/?p=201#comments</comments>
		<pubDate>Mon, 15 Feb 2010 00:20:24 +0000</pubDate>
		<dc:creator>Ben McCormack</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://benmccormack.com/index.php/2010/02/a-valentines-day-letter-to-my-wife/</guid>
		<description><![CDATA[ 
I’ve never been a huge fan of Valentine’s Day, so when I was reading the opinion section of the Atlanta Journal Constitution this past Thursday and came across an article titled “Love, yes, but be committed to marriage,” it really resonated with me.&#160; The Honorable Leah Ward Sears, who wrote the article, challenges readers [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://benmccormack.com/wp-content/uploads/2010/02/IMG_8900.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="IMG_8900" border="0" alt="IMG_8900" src="http://benmccormack.com/wp-content/uploads/2010/02/IMG_8900_thumb.jpg" width="484" height="372" /></a> </p>
<p>I’ve never been a huge fan of Valentine’s Day, so when I was reading the opinion section of the <a href="http://www.ajc.com/">Atlanta Journal Constitution</a> this past Thursday and came across an article titled “<a href="http://www.ajc.com/opinion/love-yes-but-be-297251.html" target="_blank">Love, yes, but be committed to marriage</a>,” it really resonated with me.&#160; The Honorable Leah Ward Sears, who wrote the article, challenges readers on the very first line:</p>
<blockquote><p>Here’s a word of advice this Valentine’s Day: Don’t marry for love.</p>
</blockquote>
<p>She goes on to write about how commitment, not necessarily love, is the most important part of keeping marriage alive.&#160; In fact, she even goes so far as to suggest that committing to the health of the <em>marriage</em> is more important than committing to <em>each other</em>.&#160; Those are some bold words, and after thinking about it and testing her wisdom in the context of my own young marriage, I can’t help but agree with her.</p>
<p>In reflecting on what to give my wife for our first Valentine’s Day as a married couple, I chose to write her a letter.&#160; Influenced by the article I had read, the letter shares a lot of my thoughts about marriage, love, and even a few nuggets about Valentine’s day.&#160; For those who have the stomach to digest a man’s love-letter to his newly-wed wife, here’s what I wrote to her (shared, of course, with her permission):</p>
<p> <span id="more-201"></span><br />
<blockquote>
<p>February 14, 2010</p>
<p>Dear Emily,</p>
<p>I have trouble celebrating Valentine’s Day. It seems odd to me that a married couple – albeit a newly married couple – ought to share a day of festivities with countless pairs of individuals promising undying love to one another, the kind of love that just might survive until next summer. If the lowest common denominator of Valentine’s Day is so general a form of “love” that it includes the ethereal teenage variety, I’m not sure that’s a celebration I eagerly await sharing with my spouse. I hope we have embarked on a much greater journey.</p>
<p>What if, instead of celebrating an all-encompassing “love”, Valentine’s Day instead trumpeted the institution of marriage? Would we still find <i>love</i> to be the lowest common denominator of a Valentine’s Day focused on marriage? I imagine so, but we’re left with a “love” that appears a lot different than the one that is currently celebrated.</p>
<p>We can’t include the “in love” type of love because marriages can survive without husband and wife feeling in love with one-another. Obviously, since we’re talking about love within marriage, we can throw out the type of love that lacks a lifelong promise (thus setting aside the aforementioned teenage love). Already, we’ve narrowed down a definition of love to include something that lasts one’s entire life and may or may not include feelings of desire and affection. This form of love is not going to sell a lot of greeting cards or keep Hershey’s in business.</p>
<p>The foundation of this kind of love, at its deepest core, represents commitment – the kind of commitment that presses on when passion wanes, attraction fades, and the person we thought we married is a distant memory. Surely, my dear bride, we are still very much within the joyful tide of our wedding day, and while I certainly pray that our fondness for one another only strengthens over time, the vows that I made to you require my devotion even if the joyful fruits of love seem to have withered.</p>
<p>But what of the reasons why I chose to marry you in the first place? Was not that decision founded on love? Of course it was! However, I don’t think it’s the kind of love that most of the world celebrates this Valentine’s Day. I asked you to marry me, not because of the love we had for each other at the time, but because you are the person I wanted to be committed to when the love of youth begins to depart. You’re the person I want to suffer with as we die to ourselves and struggle to make the best of our marriage. You’re the person I want to wake up next to when, after thirty years of life together, we’ve become better versions of ourselves and get to experience love in a whole new way. I love <i>you</i>; I’m committed to <i>us</i>, no matter what happens.</p>
<p>Marriage asks us to risk the death of the love we think we know and commit ourselves to a love of sacrifice that promises far richer fruit. While the fruits of our honeymoon are still quite ripe, I’m even <i>more</i> overjoyed to know that I will be experiencing the transformation of love within marriage <i>with you</i>. God has already shown me how I have become a better version of myself by being with you; I can’t wait for more.</p>
<p>This Valentine’s Day, I give you this $1.99 card, these words, our budget and goals for our family, and a re-commitment to the vows of our marriage: to be true to you in good times and in bad, in sickness and in health. I will love you and honor you all the days of my life.</p>
<p>Your devoted husband,</p>
<p>Benjamin</p>
</blockquote>
<p>&#160;</p>
<p><a href="http://benmccormack.com/wp-content/uploads/2010/02/IMG_8901.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="IMG_8901" border="0" alt="IMG_8901" src="http://benmccormack.com/wp-content/uploads/2010/02/IMG_8901_thumb.jpg" width="484" height="322" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://benmccormack.com/?feed=rss2&amp;p=201</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My First Attempt At Theming WordPress: FreesiaFloralDesign.com</title>
		<link>http://benmccormack.com/?p=194</link>
		<comments>http://benmccormack.com/?p=194#comments</comments>
		<pubDate>Tue, 02 Feb 2010 12:58:56 +0000</pubDate>
		<dc:creator>Ben McCormack</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://benmccormack.com/index.php/2010/02/my-first-attempt-at-theming-wordpress-freesiafloraldesign-com/</guid>
		<description><![CDATA[A week ago today, I got a phone call from my mother-in-law asking if I might be able to help her get her website working within a week.&#160; Things didn’t work out with her original website and it was going to be taken down within a week.&#160; Valentine’s day is fast approaching, and she needs [...]]]></description>
			<content:encoded><![CDATA[<p>A week ago today, I got a phone call from my mother-in-law asking if I might be able to help her get her website working within a week.&#160; Things didn’t work out with her original website and it was going to be taken down within a week.&#160; Valentine’s day is fast approaching, and she needs a functional website. Now.</p>
<p>I’ve dabbled with the CSS on my own WordPress blog (though I never uploaded it to the server), but theming a website from scratch was a whole new animal. Could I do it?</p>
<p>I decided to say yes.</p>
<p>Building on WordPress has myriad advantages, not the least of which is empowering the client to be able to mange most of the content herself.&#160; Sure, you don’t want your client to do <em>everything</em>, but it’s nice when the developer/designer doesn’t have to log in to change spelling, add a paragraph, etc.&#160; I get to do the big things.&#160; She can do all the little details.</p>
<p>So where did I start?</p>
<p> <span id="more-194"></span><br />
<h3>Picking A Starting Theme</h3>
<p>&#160;</p>
<p>Like I said, I’ve dabbled with CSS before and HTML is not new to me, but I still had to pick a theme that gave me a basic menu and layout and was bare regarding all the color and other details.&#160; I chose to start with <a href="http://themeshaper.com/thematic/" target="_blank">Thematic</a> and go from there:</p>
<p><a href="http://themeshaper.com/thematic/"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Thematic" border="0" alt="Thematic" src="http://benmccormack.com/wp-content/uploads/2010/02/Thematic.png" width="484" height="355" /></a> </p>
<p>As you can see, there’s no color and it’s very minimalistic. Great.</p>
<p>I started to get to work looking at the CSS.&#160; My sincerest of apologies to the authors of the Thematic Theme Framework.&#160; I had no clue how to add a child theme, so I decided to butcher their default.css file since time was of the essence.</p>
<p>All of the tools I used were free, including:</p>
<ul>
<li><a href="http://www.getpaint.net/" target="_blank">Paint.NET</a></li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" target="_blank">Notepad++</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/dd565628(VS.85).aspx" target="_blank">IE8 Developer Tools</a></li>
<li><a href="http://www.colorzilla.com/firefox/" target="_blank">ColorZilla Color Picker for Firefox</a></li>
</ul>
<ul>The developer tools for IE8 were particularly handy.&#160; Pressing F12 at any web page brings up the Developer Tools window, while pressing Ctrl+B allows you to click on any element and see what styles led to its rendering in the browser:</ul>
<ul><a href="http://benmccormack.com/wp-content/uploads/2010/02/20100202_Inspecting_with_IE8_Developer_Tool.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="2010-02-02_Inspecting_with_IE8_Developer_Tool" border="0" alt="2010-02-02_Inspecting_with_IE8_Developer_Tool" src="http://benmccormack.com/wp-content/uploads/2010/02/20100202_Inspecting_with_IE8_Developer_Tool_thumb.png" width="484" height="432" /></a> </ul>
</p>
<h3>&#160;</h3>
<h3>A few things I learned </h3>
<p>&#160;</p>
<p>One of the first things I learned was in regards to e-mail.&#160; If you have a hosted WordPress blog, a lot of hosted sites will only send mail that originates from the domain on which it is hosted.&#160; That means that if your site is <a href="http://www.benmccormack.com">www.benmccormack.com</a>, the site will only send e-mails from an e-mail address ending with @benmccormack.com.&#160; It took me a while to figure why my e-mails weren’t sending from the site and I ended up using the <a href="http://www.callum-macdonald.com/code/wp-mail-smtp/" target="_blank">WP Mail SMTP</a> plugin to send the mail via SMTP, which her host required.</p>
<p>I also used <a href="http://contactform7.com/" target="_blank">Contact Form 7</a>, which ended up being an excellent plugin for creating forms in WordPress.&#160; The javascript for the form creation was a little buggy in IE8, so I’d suggest creating the form using Firefox or another browser.</p>
<h3>&#160;</h3>
<h3>A finished product</h3>
<p>&#160;</p>
<p>Finishing a website is a wonderful thing.&#160; My mother-in-law is very happy to have a working website that <strong>she can update </strong>and presents her business in a professional manner.&#160; I still have a few things to tweak, but I would say this is a good start into the world of WordPress theming given I only had a week to pull it off:</p>
<p><a href="http://freesiafloraldesign.com/"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="2010-02-02_Freesia_Screenshot" border="0" alt="2010-02-02_Freesia_Screenshot" src="http://benmccormack.com/wp-content/uploads/2010/02/20100202_Freesia_Screenshot.png" width="484" height="355" /></a> </p>
<p>Let me know your thoughts in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://benmccormack.com/?feed=rss2&amp;p=194</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Worth It: Microsoft 4000 Keyboard</title>
		<link>http://benmccormack.com/?p=168</link>
		<comments>http://benmccormack.com/?p=168#comments</comments>
		<pubDate>Fri, 22 Jan 2010 22:11:43 +0000</pubDate>
		<dc:creator>Ben McCormack</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Computers Hardware Keyboards]]></category>

		<guid isPermaLink="false">http://benmccormack.com/?p=168</guid>
		<description><![CDATA[Several months ago, I was on twitter and noticed a few people singing the praises of the Microsoft 4000 Natural Ergonomic Keyboard : 
&#160;

I was never particularly fond of ergonomic keyboards, mainly because they feel awkward at first when compared to traditional keyboards, and also because they are not well designed for computer gaming (which [...]]]></description>
			<content:encoded><![CDATA[<p>Several months ago, I was on twitter and noticed a <a href="http://www.hanselman.com/blog/">few</a> <a href="http://www.codinghorror.com/blog/">people</a> singing the praises of the <a href="http://www.amazon.com/gp/product/B000A6PPOK?ie=UTF8&amp;tag=benmccom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B000A6PPOK">Microsoft 4000 Natural Ergonomic Keyboard</a><img style="border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important" border="0" alt="" src="http://www.assoc-amazon.com/e/ir?t=benmccom-20&amp;l=as2&amp;o=1&amp;a=B000A6PPOK" width="1" height="1" /> : </p>
<p>&#160;</p>
<p><a href="http://www.amazon.com/gp/product/B000A6PPOK?ie=UTF8&amp;tag=benmccom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B000A6PPOK"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://benmccormack.com/wp-content/uploads/2010/01/image_thumb.png" width="545" height="342" /></a></p>
<p>I was never particularly fond of ergonomic keyboards, mainly because they feel awkward at first when compared to traditional keyboards, and also because they are not well designed for computer gaming (which is perfectly fine…I believe they’re designed for <strong>typing</strong>; my priorities were <a href="http://en.wikipedia.org/wiki/Half-Life_(video_game)">much different</a> when I was younger).</p>
<p>After following the conversation on twitter, someone suggested that if using a computer (and specifically typing on a keyboard) makes up a large part of your work day, you owe it to yourself to have a good mouse and keyboard.&#160; This makes perfect sense, but I had never given much thought to the keyboards I used other than the basic fact that I needed it to use my computer.</p>
<p>As I’ve been trying to do more work that <a href="http://benmccormack.com/index.php/2010/01/using-project-euler-to-learn-a-programming-language/">involves writing code</a>, I noticed my wrists and hands starting to get sore at the end of the work day.&#160; Since I use my computer as an essential part of my job, I decided an ergonomic keyboard might help in the long term to reduce injury to my hands and possibly even improve my typing.&#160; When Dell had a sale on the keyboards, I decided to jump on it and buy one for work and one for the office.</p>
<p>While it was certainly awkward at first to position my hands angled slightly inward and tilted slightly forward at the wrist, I immediately noticed that this keyboard provides a much more natural physical position for typing than do traditional keyboards.&#160; Using this keyboard also quickly highlighted some bad typing habits that I had acquired over years of computer use.&#160; When you can’t use your left hand to press ‘Y’ because of a large gap in the middle of the keyboard, you quickly adjust your typing habits.</p>
<p>I’m very glad to say that after a month of everyday use, I’ve really come to appreciate this keyboard.&#160; I’m certain that my typing is much faster and that I’m using better technique.&#160; I also sometimes use the macro functionality built-in to the keyboard (though must of the other “extras” are left unused).&#160; Overall, this keyboard has been a fantastic investment.</p>
<p>If you’re in a field that requires a lot of typing, you owe it to yourself to give this keyboard a try.</p>
]]></content:encoded>
			<wfw:commentRss>http://benmccormack.com/?feed=rss2&amp;p=168</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes and Reflections From the Atlanta WordCamp</title>
		<link>http://benmccormack.com/?p=163</link>
		<comments>http://benmccormack.com/?p=163#comments</comments>
		<pubDate>Mon, 11 Jan 2010 02:57:16 +0000</pubDate>
		<dc:creator>Ben McCormack</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://benmccormack.com/?p=163</guid>
		<description><![CDATA[Last Wednesday, I noticed the following tweet from local Microsoft Developer Evangelist, Glen Gordon: 

After I installed WordPress on my local Windows 7 machine (which went fine, except for a weird bug with Skype), I received a complimentary pass to attend the WordCamp.
While I tend to lean towards Microsoft technologies, my blog is in fact [...]]]></description>
			<content:encoded><![CDATA[<p>Last Wednesday, I noticed the following tweet from local Microsoft Developer Evangelist, <a href="http://blogs.msdn.com/glengordon/">Glen Gordon</a>: </p>
<p><a href="http://twitter.com/glengordon/status/7456388309"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="glengordon_tweet" border="0" alt="glengordon_tweet" src="http://benmccormack.com/wp-content/uploads/2010/01/glengordon_tweet.png" width="595" height="157" /></a></p>
<p>After I installed WordPress on my local Windows 7 machine (which went fine, except for a weird bug with Skype), I received a complimentary pass to attend the <a href="http://atlantawordcamp.com/">WordCamp</a>.</p>
<p>While I tend to lean towards Microsoft technologies, my blog is in fact running WordPress, so I was glad to have the opportunity to attend a conference to bring me up to speed on the publishing platform.&#160; My hope was to learn about building themes, writing plug-ins, and maybe even pick up a little PHP.</p>
<div id='extendedEntryBreak' name='extendedEntryBreak'></div>
</p>
<p>The first thing I noticed about the conference was how different the demographic was from the Microsoft users groups I had attended.&#160; The average age of the attendees was quite young and there were lots of women.&#160; The feeling of <em>community</em> was palpable throughout the event.</p>
<p>Overall, I was glad I went, even though the actual sessions seemed somewhat weak in demonstrating how to actually do stuff in WordPress.&#160; The presenters of the sessions I attended were good, but they were heavy with PowerPoint slides and I would have appreciated some actual walk-throughs, and maybe even a peek at some actual code.&#160; Perhaps that’s the developer bias within me that likes to see things demonstrated.</p>
<h3>&#160;</h3>
<h3>People</h3>
<p>&#160;</p>
<p>I met some wonderful people throughout the day and this was by far this biggest reward on my time.&#160; </p>
<ul>
<li><a href="http://darinsehnert.wordpress.com/">Chef Darin Sehnert</a> – I know Darin from a cooking class that he taught while my wife and I were on our honeymoon.&#160; His <a href="http://darinsehnert.wordpress.com/cooking-classes/">cooking classes</a> are worth a trip to Savannah. </li>
<li><a href="http://twitter.com/positivepam">Pam Leinmiller</a> – I had lunch with Pam and learned about her background in computer science and her plans to start a blog about positive health living. </li>
<li><a href="http://blogs.msdn.com/glengordon/">Glen Gordon</a> – I enjoyed meeting Glenn and discussing Microsoft at a Word Press conference :-).&#160; I really appreciated his sharing about the Microsoft <a href="http://www.microsoft.com/web/websitespark/">WebsiteSpark</a> program. </li>
<li><a href="http://www.mospired.com/">Moses Ngone</a> –&#160; I met Moses at the “Genius Bar” and he was <strong>incredibly</strong> helpful in teaching me about a lot of the “developer” stuff that goes into WordPress.&#160; He actually sat down with me and showed me some code, helping to build my confidence about diving into HTML, CSS, and PHP. </li>
<li><a href="http://compassioninpolitics.wordpress.com/">Nathan Ketsdever</a> – After I arrived at <a href="http://www.tapat1180.com/home.php">TAP</a> for the after party (thanks sponsors!), I noticed that Nathan was ordering the same beer I was intending to order, the Left Hand Milk Stout (though I think we actually ended up drinking the Red Brick Ale 15th Anniversary Edition. Waiter, thanks for the mistake; it was <strong>amazing</strong>). </li>
<li><a href="http://www.studionashvegas.com/">Mitch Canter</a> – I talked to Mitch briefly as he was headed out the door.&#160; His session was my favorite because he got out of PowerPoint and talked about how he develops themes.&#160; I really appreciated hearing about his approach to web design. </li>
<li><a href="http://iammattthomas.com/">Matt Thomas</a> – I met Matt towards the end of the evening.&#160; He’s the designer behind <a href="http://wordpress.com/">WordPress.com</a>.&#160; I especially enjoyed geeking out with him about typography and fonts! </li>
</ul>
<ul></ul>
<h3>Notes</h3>
<p>&#160;</p>
<ul>
<li><strong>Suggested Plug-ins</strong> (most suggested by Mitch Canter)
<ul>
<li>Code Plug-in, possibly <a href="http://wordpress.org/extend/plugins/syntaxhighlighter/">Syntax Highlighter</a> </li>
<li><a href="http://wordpress.org/extend/plugins/redirection/">Redirection</a> </li>
<li><a href="http://wordpress.org/extend/plugins/twitter-tools/">Twitter Tools</a> </li>
<li><a href="http://wordpress.org/extend/plugins/google-analyticator/">Google Analyticator</a> </li>
<li><a href="http://wordpress.org/extend/plugins/stats/">WordPress.com Stats</a> </li>
<li><a href="http://wordpress.org/extend/plugins/wp-db-backup/">WordPress Database Backup</a> (WP-DB Backup) </li>
<li><a href="http://wordpress.org/extend/plugins/woopra/">Woopra</a> </li>
<li><a href="http://wordpress.org/extend/plugins/wp-super-cache/">WP Super Cache</a> (suggested by Mark Jaquith) </li>
</ul>
</li>
<li><strong>Suggested Software</strong> (from Moses Ngone)
<ul>
<li><a href="http://www.coffeecup.com/">Coffee Cup</a> </li>
<li><a href="http://developer.yahoo.com/yslow/">YSlow</a> </li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/60?collection_uuid=da0ecd99-2289-7ab0-7d57-e7c489c845c3">Web Developer Add-on</a> or <a href="https://addons.mozilla.org/en-US/firefox/collection/webdeveloper">Web Developer’s Toolbox</a> for Firefox. </li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/966">Tamper Data</a> for Firefox (it’s like Fiddler) </li>
</ul>
</li>
<li><strong>Parent/Child Themes </strong>(Ryan Imel)
<ul>
<li><a href="http://themeshaper.com/">Thematic</a> </li>
<li><a href="http://themehybrid.com">ThemeHybrid</a> </li>
<li><a href="http://www.plaintxt.org/">Sandbox</a> </li>
<li><a href="http://www.darrenhoyt.com/">Gravy</a> </li>
<li><a href="http://www.nathanrice.com/">Nathan Rice</a> </li>
<li><a href="http://wpcandy.com/">WPCandy</a> </li>
</ul>
</li>
</ul>
<h3>&#160;</h3>
<h3>Final Thoughts</h3>
<p>&#160;</p>
<p>I had a really wonderful time at the WordCamp and can’t wait to get started hacking away at my blog.&#160; Thanks to everyone for all of their hard word and inspiration!</p>
]]></content:encoded>
			<wfw:commentRss>http://benmccormack.com/?feed=rss2&amp;p=163</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Project Euler to Learn a Programming Language</title>
		<link>http://benmccormack.com/?p=9</link>
		<comments>http://benmccormack.com/?p=9#comments</comments>
		<pubDate>Tue, 05 Jan 2010 22:17:10 +0000</pubDate>
		<dc:creator>Ben McCormack</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://benmccormack.com/index.php/2010/01/using-project-euler-to-learn-a-programming-language/</guid>
		<description><![CDATA[When I first began learning to develop Silverlight applications, I noticed very quickly that I struggled a lot with C#, even those things that most programmers would consider very basic, such as:

i += j is the same as i = i + j; 
Angle Brackets &#60; &#62; usually identify a generic where a type ought [...]]]></description>
			<content:encoded><![CDATA[<p>When I first began learning to develop Silverlight applications, I noticed very quickly that I struggled a lot with C#, even those things that most programmers would consider very basic, such as:</p>
<ul>
<li><strong>i += j</strong> is the same as <strong>i = i + j;</strong> </li>
<li>Angle Brackets <strong>&lt; &gt;</strong> usually identify a generic where a type ought to be specified. </li>
<li>What in the world is <strong>LINQ</strong>? </li>
<li>What does <strong>static</strong> mean? </li>
</ul>
<p>Since I was struggling so much with C#, I decided to read <a href="http://www.amazon.com/gp/product/1590599543?ie=UTF8&amp;tag=benmccom-20&amp;link_code=as3&amp;camp=211189&amp;creative=373489&amp;creativeASIN=1590599543">Illustrated C# 2008</a> by Daniel Solis.&#160; While it was a great introduction to the language, <strong>I still found myself hungering for a way to use C</strong># and thus test my newfound knowledge.&#160; I started a few small projects, but I wasn’t getting excited about working on anything.&#160; I’m talking about the kind of excitement where you don’t want to leave work or go to bed at night because you’re having so much fun writing code.</p>
<p>Then I found <strong>Project Euler</strong>.</p>
<p> <span id="more-9"></span>
<p>Project Euler (<a href="http://projecteuler.net">projecteuler.net</a>) is a collection of math and programming problems that can be solved using just about any programming language.&#160; While the site is certainly tilted more towards math than programming in most cases, I find it to be an incredibly useful way to learn the nuances of a language and exercise one’s programming skills.</p>
<p>While some of the problems might be easily solved using math or common conventions in computer science, I like to challenge myself to learn new concepts and not simply find the answer to the question.&#160; That’s not to say that the conventional approach isn’t more efficient or correct; it often is. Rather, I’m referring to taking the time to let the problem be an opportunity to learn and try something new versus it being a mere question to be answered.&#160; Let’s walk through an example of any easy problem to see what I mean.</p>
<p>For example, Problem 1 states:</p>
<blockquote><p>If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.</p>
<p>Find the sum of all the multiples of 3 or 5 below 1000.</p>
</blockquote>
<p>There are in fact several ways to approach this, both mathematically and programmatically.&#160; Going the math route, you can utilize the geometric sum, and an alternative code solution can be as simple as a simple <code>for</code> loop with a little bit of code for logic and addition.&#160; I decided to create a simple array of integers and then try to use LINQ to find the result.&#160; This is the code I used:</p>
<p> <code>
<p>static class AddMultiples      <br />{       <br />&#160;&#160;&#160; public static int PrintSum(int length)       <br />&#160;&#160;&#160; {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; int[] arr = new int[length];       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; for (int i = 0; i &lt; length; i++)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; arr[i] = i+1;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; return arr.Where(i =&gt; (i % 5 == 0) || (i % 3 == 0)).Sum();       <br />&#160;&#160;&#160; }       <br />}</p>
<p> </code>
<p>I didn’t have to populate an array to find the answer, but I was excited to discover how easy it was to extend the functionality of the array using LINQ.&#160; The <code>return</code> statement of the method has two LINQ extension methods. The first extension method, <code>Where</code>, restricts the data set to only those numbers evenly divisible by 3 or 5, and the second extension method, <code>Sum</code>, adds the results of the data provided by the <code>Where</code> method. Sure, all of this could have been easily set up in a simple <code>for</code> loop, but what’s the fun in that?</p>
<p>If you want to play with numbers and start learning a new programming language, I recommend spending some time at <a href="http://projecteuler.net/">Project Euler</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://benmccormack.com/?feed=rss2&amp;p=9</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
