<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Pete on Software</title>
	
	<link>http://www.peteonsoftware.com</link>
	<description />
	<lastBuildDate>Tue, 05 Mar 2013 04:21:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/PeteOnSoftware" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="peteonsoftware" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>How Deep is the Rabbit Hole</title>
		<link>http://www.peteonsoftware.com/index.php/2013/03/05/how-deep-is-the-rabbit-hole/</link>
		<comments>http://www.peteonsoftware.com/index.php/2013/03/05/how-deep-is-the-rabbit-hole/#comments</comments>
		<pubDate>Tue, 05 Mar 2013 04:21:38 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=457</guid>
		<description><![CDATA[Rob Conery tweeted about a blog post that &#8220;Kakubei&#8221; made back in May of 2012. You can read about it over here. I find it interesting that the author starts off the post making a comparison between himself and his brother. That his brother&#8217;s academic success and his own academic failings (and subsequent self-taught programming [...]]]></description>
				<content:encoded><![CDATA[<p><img src="http://www.peteonsoftware.com/images/201303/ProgrammingIsHardLetsShop.jpg" alt="Programming is Hard, Let's go Shopping. From http://memegenerator.net/instance/30286782" title="Programming is Hard, Let's go Shopping. From http://memegenerator.net/instance/30286782" style="float:left; padding: .5em;" />Rob Conery tweeted about a blog post that &#8220;Kakubei&#8221; made back in May of 2012.  You can read about it over <a href="http://kakubei.blogspot.com/2012/05/why-i-hate-rails.html">here</a>.  </p>
<p>I find it interesting that the author starts off the post making a comparison between himself and his brother.  That his brother&#8217;s academic success and his own academic failings (and subsequent self-taught programming skills) are at odds and that the industry would view one of them as a &#8220;real programmer&#8221; and the other one as not a &#8220;real programmer&#8221;.  </p>
<p>As I often like to point out, every programmer is a self taught programmer.  You may get the fundamentals at college and learn some things that can make you more efficient or a better designer of computer systems, but with the pace that technology is changing, you have to constantly learn to keep up.  </p>
<p>That being said, Kakubei&#8217;s main complaint is that Rails is hard to learn.  He compares the canonical &#8220;15 minute blog&#8221; demos to what it takes to do &#8220;real world&#8221; Rails development and he comes up with a big differential.  </p>
<p>What I find funny is that he seems to have come from a PHP background.  That means that he had to know the PHP language, possibly a PHP framework (like Cake), HTML, CSS, JS, probably MySql, etc.  I say that to say this, he had to know a lot to work and he wasn&#8217;t coming to Rails from zero.</p>
<p>The author complains that to use Rails, you have to know Ruby and that you have to know MVC, Gems, RVM, Active Record, HomeBrew, HTML, CSS, JavaScript/jQuery, Rake, Capistrano, etc.  My point is that he probably already knows HTML, JS, and CSS.  If he owns a Mac, he has probably already encountered HomeBrew (it isn&#8217;t just for developers).  If not, this was a fine time to learn.</p>
<p>I think this all boils down to something else, though.  What does it take to be productive or at least &#8220;mildly useful&#8221; in a language/framework?</p>
<p>To me, I was able to follow a simple Rails tutorial and starting using Rails almost immediately.  Know what I didn&#8217;t need?  RVM.  Just starting out, I just used one version of Ruby and Rails.  As for Gems, in order to do my tutorial, I had to say &#8220;gem install rails&#8221;, so I already had an idea how it worked.  After that, you can pretty much avoid using it if you don&#8217;t mind rewriting code that is already a &#8220;solved problem&#8221;.</p>
<p>What about HomeBrew?  Don&#8217;t need it.  Active Record?  All you need to know to actually make stuff happen is in the &#8220;15 minute&#8221; video.  Same with the MVC pattern.  I didn&#8217;t know anything about making MVC websites and I was up and moving with minimal instruction from the video.  Rake?  Didn&#8217;t need anything special there, either, because I hadn&#8217;t created a very complicated system yet.  Capistrano?  I need an automated deployment on day one?</p>
<p>My point is that every rabbit hole is very deep.  .Net?  WebForms or ASP.Net MVC? HTML, CSS, JS/jQuery.  Dependency Injection with AutoFac/AutoMapper/Ninject.  ORMs like Entity Framework, NHibernate, etc.  Don&#8217;t forget the language (C# or VB.Net or F# or whatever).  How about Nuget for package management?  Don&#8217;t forget source control, like TFS or Git.  What about knowing testing like NUnit, xUnit, MSTest?  Deploying with MSBuild and MSDeploy or one of the bajillion open source tools?  </p>
<p>I could follow the same path to describe getting started in web development with Node.js or Python or whatever you could think of.  It is silly to think that you can go from 0 to Amazing in 15 short minutes.  That pattern doesn&#8217;t work.</p>
<p>What you have to know is how to learn.  You have to know how to Just-In-Time the information so that you can be productive from the jump off.  Yes, that means that you&#8217;ll always be learning, but if that concept doesn&#8217;t excite you, then you are probably in the wrong field.</p>
<p>I believe that that sort of complaining (&#8220;The development stack is too deep/rich&#8221;) shows a certain level of professional immaturity.</p>
<p>I realize that after Rob tweeted, Kakubei added an update after people started commenting, saying:</p>
<blockquote><p>&#8220;I&#8217;ve been using Rails for more than a year and I still use it. In fact, I&#8217;m in the process or rewriting our main application’s API in Padrino with ActiveRecord, Thinking Sphinx and deploying to Heroku and it has been a primarily positive experience despite some teething issues. The admin for our database I&#8217;ve written in Rails 3.2 and there is a lot to like there. The idea was to write another post after this one titled &#8220;Why I love Rails&#8221; but I never got around to it. Even though this post is a rant, I still feel that way about Rails, so keep those comments coming, but don&#8217;t feel you have to convince me that Rails is good, I just take umbrage with some of its complexities and with the people who sell it as being simple and easy to learn. In the meantime, I&#8217;ll keep ranting.&#8221;</p></blockquote>
<p>I understand his response and understand that he was probably frustrated when he wrote the post and he is not really apologizing for it.  That leaves me to still consider my criticism valid that I believe that he faced the problem all wrong (or at least described a method that did just that).</p>
<p>To me, you learn the basics of the thing.  You see what skills you have that you can already reuse (HTML, CSS, JS, SQL, whatever).  Then, you pick up what you need, working with the &#8220;training wheels&#8221; that the frameworks or languages give you.  Then, steadily over time you start to grow and move deeper in the tooling until one day you are someone that others look to for advice.  </p>
<p>That&#8217;s the only way we&#8217;re going to make it in this crazy development world.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2013/03/05/how-deep-is-the-rabbit-hole/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Best Nine Dollars a Month You’ll Ever Spend</title>
		<link>http://www.peteonsoftware.com/index.php/2013/02/24/best-nine-dollars-a-month-youll-ever-spend/</link>
		<comments>http://www.peteonsoftware.com/index.php/2013/02/24/best-nine-dollars-a-month-youll-ever-spend/#comments</comments>
		<pubDate>Sun, 24 Feb 2013 20:54:40 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=455</guid>
		<description><![CDATA[I&#8217;ve been getting more and more into iOS programming recently. It is something that I&#8217;ve been doing more and more as a hobby, as well as landing a few paying consulting roles creating native iOS applications. I&#8217;ve kind of been &#8220;marinating&#8221; in iOS for some time, but about a year ago I started really getting [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been getting more and more into iOS programming recently.  It is something that I&#8217;ve been doing more and more as a hobby, as well as landing a few paying consulting roles creating native iOS applications.  I&#8217;ve kind of been &#8220;marinating&#8221; in iOS for some time, but about a year ago I started really getting serious and attempting to have an actual goal with regards to Objective-C and iOS.</p>
<p>One good FREE resource is the <a href="http://tekpub.com/productions/iphone">Introduction to iPhone</a> series on TekPub with Ben Schierman.  It was done a few years ago, and Rob Conery has now given it to the community.  It is a little out of date, but you can&#8217;t beat the price and it will help you learn a few things.  </p>
<p>I have a TekPub subscription, so from there I moved on to <a href="http://tekpub.com/productions/objectivec">Show Me Objective-C</a>, another Ben Schierman TekPub series.  I really liked the way that Ben explained things, so I started doing a little <span style="text-decoration: line-through;">cyber-stalking</span> digging about him and I discovered his site over at <a href="http://nsscreencast.com/">NSScreencast</a>.</p>
<p>Ben has some free videos there, as well.  I downloaded and watched them all and learned a TON.  His video about AFNetworking alone was worth the time.  I noticed that he had a subscription package initially, but didn&#8217;t check back into it until I had watched all of the free videos.  I&#8217;m glad I did.  He offers full access to his videos (new ones weekly) for only $9.00 a month.  </p>
<p>This is a BARGAIN!</p>
<p>I feel like &#8211; thanks to Ben &#8211; that I am an honest-to-goodness-real-life iPhone Developer now.  I&#8217;m not scared of Xcode, I&#8217;m not mystified by Objective-C, nothing.  With the videos he has to date, you can spend a weekend and gain an insane amount of confidence on the platform.  I highly recommend it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2013/02/24/best-nine-dollars-a-month-youll-ever-spend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>750 Words</title>
		<link>http://www.peteonsoftware.com/index.php/2012/12/13/750-words/</link>
		<comments>http://www.peteonsoftware.com/index.php/2012/12/13/750-words/#comments</comments>
		<pubDate>Thu, 13 Dec 2012 22:19:09 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Goals]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=451</guid>
		<description><![CDATA[Recently, I started using a site called 750 words. Its name basically sums up what it is. Basically, you sign up for the site and you just type in daily writings. It does analysis of your words and tells you all kinds of stats about what you&#8217;ve written, how long it takes you to write, [...]]]></description>
				<content:encoded><![CDATA[<p>Recently, I started using a site called <a href="http://750words.com/">750 words</a>.  Its name basically sums up what it is.  Basically, you sign up for the site and you just type in daily writings.  It does analysis of your words and tells you all kinds of stats about what you&#8217;ve written, how long it takes you to write, how many interruptions you typically have, etc.  According to the site, 750 words is about 3 printed pages of work, so you are making good-sized chunks of writing each day.  Each entry is private, so you don&#8217;t have to worry about grammar or spelling (though you&#8217;d obviously want that to be improving as you went).  Another neat feature is that the creator has made it very easy to export your writings.  You own it, you shouldn&#8217;t have to worry about being locked in.  I definitely appreciate that aspect of the site.</p>
<p>I started 37 days ago and I&#8217;ve completed 37 days.  I&#8217;m a bit of a compulsive person, so once I build up a habit like this, it actually stresses me out to break it.  I&#8217;m probably the poster child that the site&#8217;s founder had in mind when he created the site.  Each month, there are also &#8220;challenges&#8221; that you can participate in.  You sign up and commit to write something every day for that month.  I&#8217;m 13 for 13 in December so far (obviously since I&#8217;ve written every day for the last 37).  The site even lets you define a reward and a penalty for completing or not completing the challenge.  There is no way to enforce it, it is just for fun.  </p>
<p>The site is such a simple concept (the best ones are), but I&#8217;ve found it really helpful to get into a writing habit.  At first, I would just write about my day.  I haven&#8217;t had a private &#8220;general purpose&#8221; blog in a while, so I did that.  However, that only lasted about 4 or 5 days before I grew tired of it.  3 pages of good stuff doesn&#8217;t happen to me EVERY DAY!  My original goal was that I&#8217;d be able to free write and take notes and use those notes as primers for blog posts.  I changed that goal a few weeks ago.</p>
<p>During <a href="http://tekpub.com/">TekPub</a>&#8216;s Black Friday Sale, I signed up for my own personal annual TekPub Subscription.  Two years ago, my employer bought me one, but I work for myself now and I needed to invest a little more in my education.  What I started doing was &#8220;live blogging&#8221; the videos as I watched them.  This served three purposes.</p>
<ol>
<li>Complete my Daily 750 Words</li>
<li>Watch a New TekPub Video Every Day</li>
<li>Create Lots of Very Useful Notes For Future Blog Posts</li>
</ol>
<p>To date, I&#8217;ve watched the entire TekPub Speed Series with Sam Saffron, the Node Series, and all of the Jon Skeet Stack Overflow Question of the Day TekPub TV videos, &#8220;live blogging&#8221; them all.  Along the day, I have paused to journal some incredible days that I&#8217;ve had or some interesting projects that I was working on, but I always fall back to the TekPub videos as a great source of content.  The bonus is that I&#8217;ve learned a great deal so far.</p>
<p>Today&#8217;s blog post is a little meta.  This post itself is today&#8217;s 750 Words.  No need to write 1500 words today when a little reuse can do.  I&#8217;m a programmer, after all, appropriate reuse is the goal.</p>
<p>Why might 750Words.com be appropriate for you?  Maybe you don&#8217;t have a blog, technical or personal.  Perhaps you don&#8217;t see the use of writing all of these daily words with no intention of anyone ever reading it.  I think for someone like that, the site still has merit.  First, one of many developers&#8217; greatest weaknesses is communication.  I&#8217;ve seen it over and again that clients aren&#8217;t happy with the level of communication (particularly written communication) from their developers.  And we all know that the best way to build a muscle is to work that muscle, so daily writing will help.</p>
<p>Secondly, you may discover that you have a love of writing.  Maybe your words won&#8217;t ever get beyond the 750Words.com vault, but maybe you&#8217;ll write and find that you enjoy it.  If 750 words really is about 3 printed pages, in 3 months, you could have about 270 pages of material.  Assuming you kept a consistent theme or themes, you are actually a good deal of the way to having written a book.  You could export your posts, edit them into a more coherent theme, and publish them to the world on the Kindle store.  </p>
<p>Since book writing is something that I&#8217;ve always wanted to do at least once, I&#8217;ve certainly considered that route, but for now I&#8217;m just trying to build blog posts.  Maybe one day soon, I&#8217;ll build that into a book.  I don&#8217;t know now if it would be fiction or non-fiction, technical or not, for now I&#8217;m just enjoying the writing process.</p>
<p>So, if you can see any value in daily writing at all, head on over to <a href="http://750words.com/">750 words</a> and create an account and start writing.  At the risk of being a cliché, the journey of 1000 miles starts with a single step.  Do 750 Words today, take the first step.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2012/12/13/750-words/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Implicit and Explicit Operators</title>
		<link>http://www.peteonsoftware.com/index.php/2012/09/15/implicit-and-explicit-operators/</link>
		<comments>http://www.peteonsoftware.com/index.php/2012/09/15/implicit-and-explicit-operators/#comments</comments>
		<pubDate>Sun, 16 Sep 2012 00:54:31 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=443</guid>
		<description><![CDATA[I came across an interesting article the other day. It was about a &#8220;forgotten&#8221; C# feature, the implicit and explicit operators. You can see the original article here. I do remember reading something about these operators years ago, but I don&#8217;t think that I&#8217;ve seen these operators at use in the wild, though I can [...]]]></description>
				<content:encoded><![CDATA[<p><img src="http://www.peteonsoftware.com/images/201209/ExplicitSemantics.jpg" style="float:left; margin:.5em;" alt="Explicit Semantics" title="Explicit Semantics" />I came across an interesting article the other day.  It was about a &#8220;forgotten&#8221; C# feature, the implicit and explicit operators.  You can see the original article <a href="http://www.codeproject.com/Tips/452213/Forgotten-Csharp-language-features-implicit-operat">here</a>.  I do remember reading something about these operators years ago, but I don&#8217;t think that I&#8217;ve seen these operators at use in the wild, though I can definitely think of a ton of times that we needed it.</p>
<p>If you don&#8217;t know yet, the explicit and implicit operators help with converting one object of one type into another object of another type.  The best use case for this isn&#8217;t for converting simple types like ints into doubles, but for converting more complex objects.  One common example would be if you are using something like nHibernate or Entity Framework that generates classes for all of your database tables.  However, if you are using WCF/Web Services/Remoting/Whatever, you might have different classes that need to exist before transmission.  </p>
<p>Let&#8217;s pretend that we have the following classes:</p>
<pre name="code" class="csharp">
namespace DataClasses
{
    public class Person
    {
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public int PersonId { get; set; }
    }
}

namespace ContractClasses
{
    public class Person
    {
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public int PersonId { get; set; }
    }
}
</pre>
<p>Now, we can see that the classes have the same names and identical declarations.  Again, this is very simplified, but it is a real problem.  This is one of the types of things that the excellent tool <a href="http://automapper.org/">AutoMapper</a> is used for.  AutoMapper does this for you automatically, of course, but if you only need this for a few instances, you may not want to take a dependency.  If you just try this code, you will get the error &#8220;Cannot implicitly convert type &#8216;DataClasses.Person&#8217; to &#8216;ContractClasses.Person&#8217;&#8221;.</p>
<pre name="code" class="csharp">
DataClasses.Person dcPerson = new DataClasses.Person() {FirstName = "Pete", LastName = "OnSoftware", PersonId = 7};
ContractClasses.Person ccPerson = dcPerson;
</pre>
<p>However, if you add this code into the DataClasses.Person class (either directly or with a partial), the above code now compiles.</p>
<pre name="code" class="csharp">
public static implicit operator ContractClasses.Person (DataClasses.Person p)
{
    return new ContractClasses.Person()
               {
                   FirstName = p.FirstName,
                   LastName = p.LastName,
                   PersonId = p.PersonId
               };
}
</pre>
<p>That does make the code compile, but we are losing some of what is happening there.  That is why the explicit operator exists.  It allows you to not do a &#8220;hidden&#8221; convert, but instead make an explicit cast.  If we change the code to look like this our code breaks again:</p>
<pre name="code" class="csharp">
public static explicit operator ContractClasses.Person (DataClasses.Person p)
{
    return new ContractClasses.Person()
               {
                   FirstName = p.FirstName,
                   LastName = p.LastName,
                   PersonId = p.PersonId
               };
}
</pre>
<p>However, if we change our original code to this, we are back in business and much more readable.</p>
<pre name="code" class="csharp">
DataClasses.Person dcPerson = new DataClasses.Person() {FirstName = "Pete", LastName = "OnSoftware", PersonId = 7};
ContractClasses.Person ccPerson = (ContractClasses.Person)dcPerson;
</pre>
<p>This isn&#8217;t limited to converting &#8220;identical&#8221; classes.  Jeffrey T. Fritz, the author of the article above that inspired this post converted from an order class to a receipt class, for instance.  I definitely believe that using explicit and implicit can make your code much more readable than using utility/conversion classes or extension methods to accomplish the same thing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2012/09/15/implicit-and-explicit-operators/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Git Error : (does not point to a valid object)</title>
		<link>http://www.peteonsoftware.com/index.php/2012/07/30/git-error-does-not-point-to-a-valid-object/</link>
		<comments>http://www.peteonsoftware.com/index.php/2012/07/30/git-error-does-not-point-to-a-valid-object/#comments</comments>
		<pubDate>Mon, 30 Jul 2012 21:46:14 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Code Tips]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=430</guid>
		<description><![CDATA[A friend of mine IMed me the other day to ask if I had ever seen an error like the one below: error: unable to find e291a84831b445ba982539cc63a418126f0b5364 error: refs/heads/master does not point to a valid object! fatal: Couldn't find remote ref master fatal: The remote end hung up unexpectedly I had not, but it seemed [...]]]></description>
				<content:encoded><![CDATA[<p>A friend of mine IMed me the other day to ask if I had ever seen an error like the one below:</p>
<pre>
error: unable to find e291a84831b445ba982539cc63a418126f0b5364
error: refs/heads/master does not point to a valid object!
fatal: Couldn't find remote ref master
fatal: The remote end hung up unexpectedly
</pre>
<p>I had not, but it seemed plain enough.  It appeared that the head of the master branch was pointing to a commit that didn&#8217;t actually exist in the repository.  I don&#8217;t know for sure how this happened, but my friend&#8217;s team suspected a disrupted internet connection on push as one theory.</p>
<p>I Googled the error and found suggestions like &#8220;make a new remote&#8221; and &#8220;clone to a new branch, push, delete master, rename new branch&#8221;.  This seemed like just too much work.  There had to be an easier solution.  </p>
<p>I was unable to clone the remote to my own machine (I got that same error on trying) and the team was in another state, so &#8211; short of a screensharing session &#8211; I couldn&#8217;t easily work with them on the problem.</p>
<p>I had the developer who had done the last known valid commit before this error send me the most recent 5 items output from the &#8220;git log&#8221; command and got the following (edited for privacy):</p>
<pre>
commit b65f24a64e78b38d193aa545d7b184fe26330a4c
Author: Joe Developer &lt;joed@somewhere.com&gt;
Date:   Fri Jul 27 10:05:53 2012 -0400

    Moved foo.jar to libs folder

commit 32b15424509881760667a77b615cc91e8e31afb9
Author: Joe Developer &lt;joed@somewhere.com&gt;
Date:   Thu Jul 26 21:45:46 2012 -0400

    Load swf files

commit bfac8d86c20ebbcac22af4e599e5815b0586f3d0
Author: Joe Developer &lt;joed@somewhere.com&gt;
Date:   Thu Jul 26 19:18:25 2012 -0400

    Navigation bug fixes

commit 60c5ff87435861157e56d948e09c63ad2f4db520
Author: Jane Developer &lt;janed@somewhere.com&gt;
Date:   Thu Jul 26 15:52:36 2012 -0400

    post merge

commit 1a97d137a51c6cd34825e4c9bc705620dfff7712
Author: Jane Developer &lt;janed@somewhere.com&gt;
Date:   Thu Jul 26 15:24:40 2012 -0400

    initial commit
</pre>
<p>Because Git is based in the file system, I could literally navigate to the remote file system and go to the ProjectName.git folder and into the refs/heads/ folder and find the master file (no extension).  Inside was one string, the offending e291a84831b445ba982539cc63a418126f0b5364.  I just replaced that string with the hash of the latest valid commit &#8211; b65f24a64e78b38d193aa545d7b184fe26330a4c &#8211; and then saved.</p>
<p>After that, I could clone the repo and the developers could pull, merge, and push their own changes.  They were using DropBox in this instance as a &#8220;poor man&#8217;s remote&#8221; and upon further reflection, I have to wonder if that is what caused the conflict.  Perhaps there was a problem with DropBox syncing all of the files and maybe a race condition at some point that resulted in a corruption?  I know DropBox isn&#8217;t a perfect &#8220;remote server&#8221; solution, but a lot of people use it for certain circumstances, so this might be something to look out for.</p>
<p>If anyone else has seen this error and has a better fix than the one described here, then please leave a comment and let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2012/07/30/git-error-does-not-point-to-a-valid-object/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>C# Extension Methods on Null Objects</title>
		<link>http://www.peteonsoftware.com/index.php/2012/06/21/c-extension-methods-on-null-objects/</link>
		<comments>http://www.peteonsoftware.com/index.php/2012/06/21/c-extension-methods-on-null-objects/#comments</comments>
		<pubDate>Thu, 21 Jun 2012 16:44:52 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Code Tips]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=427</guid>
		<description><![CDATA[Here is something that I just learned yesterday that I didn&#8217;t know. This was one of those fun things where I knew every piece of the puzzle, but had never &#8220;realized&#8221; or &#8220;made the connection&#8221; between all of them. If you aren&#8217;t sure what extension methods are, I wrote a blog post about them back [...]]]></description>
				<content:encoded><![CDATA[<p>Here is something that I just learned yesterday that I didn&#8217;t know.  This was one of those fun things where I knew every piece of the puzzle, but had never &#8220;realized&#8221; or &#8220;made the connection&#8221; between all of them.</p>
<p>If you aren&#8217;t sure what extension methods are, I wrote a blog post about them back in 2008 that you can check out <a href="http://www.peteonsoftware.com/index.php/2008/02/19/c-extension-methods/">here</a>.</p>
<p>Here is an example for today:</p>
<pre name="code" class="csharp">
    public static class ExtensionMethods
    {
        public static bool IsEmptyStringArray(this string[] input)
        {
            if (input == null) return true;

            return !input.Any();
        }
    }
</pre>
<p>What I&#8217;ve done is just create a method that allows you to call .IsEmptyStringArray() on any string array to find out if it has any items in it.  I realize that this is a fairly useless example, but it is contrived for the sake of the demonstration.</p>
<p>Now, if I call a &#8220;framework&#8221; method on a null string array, I get an error.  So, doing something like this:</p>
<pre name="code" class="csharp">
string[] nullArray = null;
var hasItems = nullArray.Any();
</pre>
<p>Results in the error &#8220;Unhandled Exception: System.ArgumentNullException: Value cannot be null.&#8221;</p>
<p>However, I *CAN* call my extension method on that null array.</p>
<pre name="code" class="csharp">
string[] nullArray = null;
var hasItems = !nullArray.IsEmptyStringArray();
Console.WriteLine(hasItems);
</pre>
<p>This code produces the following result:<br />
<img src="http://www.peteonsoftware.com/images/201206/ExtensionMethodOnNullResult.jpg" alt="Result of calling an extension method on a null string array" title="Result of calling an extension method on a null string array" /></p>
<p>How does that work?  This is what I had neglected to put together in my mind.  When you write an extension method, what actually gets compiled is this:</p>
<pre name="code" class="csharp">
call bool CodeSandbox2010.ExtensionMethods::IsEmptyStringArray(string[])
</pre>
<p>The &#8220;syntactic sugar&#8221; part is that you aren&#8217;t actually calling a method on the null object at all.  You are just calling your method and passing in the parameter, just like any other method.  I really like that because it gives you a concise way to write your code without the same null check over and over and over again throughout your codebase.  You can just check in the method and then get on with what you&#8217;re doing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2012/06/21/c-extension-methods-on-null-objects/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nerds Don’t Get It</title>
		<link>http://www.peteonsoftware.com/index.php/2012/06/17/nerds-dont-get-it/</link>
		<comments>http://www.peteonsoftware.com/index.php/2012/06/17/nerds-dont-get-it/#comments</comments>
		<pubDate>Mon, 18 Jun 2012 02:41:50 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=417</guid>
		<description><![CDATA[Raymond Chen recently wrote a blog post where he talks about blocking shutdown in Windows versions since XP, and &#8211; being Raymond Chen &#8211; also the history and the why of certain decisions coming out of Redmond. This blog post was picked up on Reddit and people are slamming Windows for every possible thing. What [...]]]></description>
				<content:encoded><![CDATA[<p><img src="http://www.peteonsoftware.com/images/201206/Clueless.jpg" alt="Clueless" title="Clueless" style="float: left; margin: .5em;" />Raymond Chen recently wrote <a href="http://blogs.msdn.com/b/oldnewthing/archive/2012/06/14/10319617.aspx">a blog post</a> where he talks about blocking shutdown in Windows versions since XP, and &#8211; being Raymond Chen &#8211; also the history and the why of certain decisions coming out of Redmond.  This blog post was picked up <a href="http://www.reddit.com/r/programming/comments/v28kb/now_that_windows_makes_it_harder_for_your_program/">on Reddit</a> and people are slamming Windows for every possible thing.</p>
<p>What is interesting is that these people, who are suggesting that &#8220;Linux never had to do this&#8221;, just don&#8217;t get it.  Linux is getting better, but it is *still* not user friendly.  90% of the people that work at companies that I&#8217;ve worked at could not run Linux without a lot of help.  My grandparents couldn&#8217;t use Linux without a lot of help.  Windows is generally easy to use.</p>
<p>If I generalize a bit, it almost seems like operating systems have their own &#8220;magic triangle&#8221;.  You can have inexpensive, stable, or easy to use&#8230; pick only two.  Linux is inexpensive and stable.  It is free for the operating system and it runs on almost any hardware you can get, but it is NOT easy to use for the average &#8220;non geek&#8221;.  Mac is stable and easy to use.  It is known for all of its &#8220;user experience&#8221; and &#8220;it just works&#8221;, but it is not inexpensive.  Once you own Mac hardware, upgrades to the OS are inexpensive, but to run the OS, you need expensive hardware.  There is no good $300 Mac option.</p>
<p>Windows, on the other hand, is inexpensive and easy to use.  It is growing more stable, but it still has a lot of quirks, particularly due to being able to support tons of hardware and tons of decades-old software.  But easy and cheap is a tradeoff that many users are going to take.  Because of that, Windows is going to have a place in the market for years to come, even if its marketshare will continue to erode as the marketshare of the desktop itself erodes.</p>
<p>But my theories about operating systems aren&#8217;t the point of this post, they are merely the backdrop.  The point is that &#8220;nerds&#8221; (programmers, sys-admins, geeks, and all computer-savvy types) don&#8217;t sympathize enough with the average user.  The computer elite just dismiss the average user as &#8220;dumb&#8221; and wonder why they can&#8217;t just remember to type &#8220;sudo apt-get install flashplugin-installer&#8221; to install flash on their system.  </p>
<p>Remember, there are users that take classes on how to use Microsoft Word!  They need lessons in &#8220;Saving a Document&#8221;, &#8220;Performing Cut and Paste&#8221;, and &#8220;Changing the Document&#8217;s Font&#8221;.  I&#8217;m not mocking them for this, I&#8217;m pointing out the reality that these people are dealing with.  To ask them to understand &#8220;sudo&#8221; and &#8220;apt-get&#8221; or scavenging the web to find some &#8220;driver&#8221; for their video card (&#8220;what&#8217;s a driver&#8221;, &#8220;what&#8217;s a video card&#8221;) is asking too much.  They just want to get on Facebook, do their taxes, check their email, and watch movies or YouTube.  What makes sense for we Nerds does not make sense for them.</p>
<p>Building up that sensitivity to the plight of the average user will make you a better IS/IT person.  As long as the prevailing opinion of computer geeks is that the user should be able to perform these &lt;my_sarcasm&gt;easy&lt;/my_sarcasm&gt; tasks, people that sympathize with the user are always going to have an easy time finding employment.</p>
<p>I&#8217;ve said this before, but I feel like it is one of the most important things I can say to the professional developer/IT pro: <strong>&#8220;We are in the business of solving other people&#8217;s problems&#8221;</strong>.  </p>
<p>Solving other people&#8217;s problems doesn&#8217;t mean solving them with what works <strong><em>for us</em></strong>.  It means giving the best solution <strong><em>for them</em></strong>.  It doesn&#8217;t matter if you work for a product company or in-house enterprise development.  You need to create solutions that meet your customers <strong><em>where they are</em></strong>.  The sooner we realize that these things are not always in alignment, the sooner we will delight our customers with the solutions that we suggest and build.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2012/06/17/nerds-dont-get-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>James Whittaker Hates Search</title>
		<link>http://www.peteonsoftware.com/index.php/2012/04/05/james-whittaker-hates-search/</link>
		<comments>http://www.peteonsoftware.com/index.php/2012/04/05/james-whittaker-hates-search/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 00:15:55 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=413</guid>
		<description><![CDATA[A blog post came onto my radar today after it made the rounds on Hacker News. It was by James Whittaker and it was titled &#8220;Why I Hate Search&#8220;. Full disclosure is that James works for Microsoft, so some people have the notion that he is just hating on search (and therefore Google) because it [...]]]></description>
				<content:encoded><![CDATA[<p><img src="http://www.peteonsoftware.com/images/201204/MyOpinion.jpg" alt="My Opinion of Your Opinion" title="My Opinion of Your Opinion" style="float: left; margin: .5em;" />A blog post came onto my radar today after it made the rounds on Hacker News.  It was by James Whittaker and it was titled &#8220;<a href="http://blogs.msdn.com/b/jw_on_tech/archive/2012/03/15/why-i-hate-search.aspx">Why I Hate Search</a>&#8220;.  Full disclosure is that James works for Microsoft, so some people have the notion that he is just hating on search (and therefore Google) because it is in Microsoft&#8217;s best interests to do so.  I am someone who typically takes someone at their words and &#8211; in cases like this &#8211; prefer to examine the argument based on the facts at hand.</p>
<p>James&#8217; post starts off by talking about the entire notion of search is negative and is only actually positive when the search has concluded and you&#8217;ve found what you were looking for, be it car keys, a missing person, etc.  He further argues that in &#8220;real world&#8221; searching, you learn from your searches and don&#8217;t have to start from scratch every time.  For instance, if I lose my keys often enough, there are four or five places that I&#8217;ll check first and likely find them.  His argument is that web search is a &#8220;start from scratch every time&#8221; proposition.  </p>
<p>James claims that it is not in search companies&#8217; best interest to make this problem better.  Those that make money from ads (hi, Google), want you searching and spending time on results pages, generating impressions and click-throughs, and whatever else they make money on.  In his estimation, the alternate to this kind of product is a &#8220;find engine&#8221;, like Siri.  He points out that Siri comes from a company that doesn&#8217;t have a stake in search (Apple).  His quote that summarizes this position is, &#8220;There&#8217;s no more reason to expect search breakthroughs from Google than there is to expect electric car batteries to be made by Exxon.&#8221;  He says that &#8220;Search is dead. The web doesn&#8217;t need it and neither do we.&#8221;</p>
<p>It could be that I&#8217;m entirely too stupid to understand this post or that I&#8217;m not forward thinking enough.  Siri barely works if you get outside of a very small comfort zone.  The way that I use Google every day is that I search error messages, and bits of quotes or lyrics, and generic problems that I can barely phrase coherently.  Things like &#8220;what is the default LDAP port for Active Directory&#8221;.  I just asked Siri that and she did capture my question correct with voice recognition, but her response was &#8220;I don&#8217;t know that. Would you like to search the web for it?&#8221;.  In the end, it was a Google search that was performed that gave me the answer of 389.</p>
<p>That example is a COHERENT question of mine.  What about when I need to search for something like examples of calling a SOAP web service from Android?  I Google &#8220;SOAP Android&#8221; and find answers.  Even if I form that into a coherent question, &#8220;How do I call a SOAP web service from Android?&#8221;, Siri says, &#8220;I don&#8217;t see Soap Web Service From Android in your address book, should I look for businesses by that name?&#8221;.  Siri heard &#8220;call&#8221; and thought telephone and then screwed up the rest of the message, even though SOAP and Web Service should have given the AI a semantic clue.</p>
<p>I don&#8217;t want to belabor the point, though.  Natural language processing will get better.  However, I think that it is a pipe dream to expect that I can ask my question and Siri or the great great great great granddaughter of Siri will just give me my answer.  Often in my searches, what is the answer for me is not the answer for someone else.  I just can&#8217;t fathom a reality in which I can ask one question and not have a list of answers (yes, search results) to pick from.  Even on Star Trek: TNG, for the hard questions, Data would ask the computer a question and have to search through tons and tons of information flowing past the screen to find the results he was looking for.</p>
<p>Search isn&#8217;t dead.  In fact, more and more products and companies are starting to get rid of boxes where you have to search with &#8220;context&#8221; (put the first name here if you know it, the last name here if you know it) and instead moving to &#8220;Google-style&#8221; searches.  The &#8220;single search box&#8221; is here whether it is Bing, Google, Stack Overflow, Sharepoint, Wolfram|Alpha, or even implicit ones like on Siri.  The only difference I see between James&#8217; imaginary future and our present is the ability for someone to give you the &#8220;one answer&#8221; that you are looking for, instead of results.  </p>
<p>I&#8217;ve learned one thing by watching users and that is that people SUCK at search and they SUCK at asking questions, too.  As long as people can&#8217;t form coherent questions or at least isolate the important parts of their inquiry, I don&#8217;t think search will ever change from the lineage that we are on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2012/04/05/james-whittaker-hates-search/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I Hate Agile</title>
		<link>http://www.peteonsoftware.com/index.php/2011/12/17/why-i-hate-agile/</link>
		<comments>http://www.peteonsoftware.com/index.php/2011/12/17/why-i-hate-agile/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 15:04:05 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=402</guid>
		<description><![CDATA[Okay, now that I got the link-bait title out of the way, I am going to rant just a little bit. I imagine that I&#8217;m like most of you and I think that some flavor of agile (little a) is really the best way to develop software. I think that collaborating with the business and [...]]]></description>
				<content:encoded><![CDATA[<p>Okay, now that I got the link-bait title out of the way, I am going to rant just a little bit.  I imagine that I&#8217;m like most of you and I think that some flavor of agile (little a) is really the best way to develop software.</p>
<p>I think that collaborating with the business and getting things in front of them as soon as possible so that you can make changes to it as you go is a very valuable model.  I am also very much for the short release cycles that most agile shops prefer.</p>
<p>What I <strong><em>despise</em></strong>, however, is what I call &#8220;Agile as Snake Oil&#8221;.  There are a lot of disreputable companies that are putting the word out there that all you have to do is hire them and they can &#8220;sprinkle a little agile&#8221; on your project or your company and you will magically get everything you want.</p>
<p><img src="http://www.peteonsoftware.com/images/201112/AgilePrinciplesPatternsAndPractices.jpg" alt="Uncle Bob's Agile Book" title="Uncle Bob's Agile Book" style="float:left;padding:.5em;" />They crow that Agile means that you can not make up your mind on what you want until the last minute because Agile Developers have to do what you say and are bound by the Laws of Agile to always change the software for the client.  They want their cake and to eat it, too.  They want all of the spec changes and none of the timeline changes or compromises.</p>
<p>Oh, that they would actually read something like Robert C. Martin&#8217;s book, <em>Agile Principles, Patterns, and Practices</em>.  I&#8217;ll tell you what, I think that if people only read the end of the book, where Uncle Bob tells a tale of two cities, a project where the team does a &#8220;traditional waterfall approach&#8221; and the same project where the team practices an &#8220;agile approach&#8221;, it would make a world of difference.  </p>
<p>As you can imagine, the waterfall approach ends in disaster, with stress and hard feelings abounding.  In contrast, people are satisfied &#8211; almost happy &#8211; with the agile approach.  The HUGE takeaway from the agile story, however, is that it was not a 100% win for either side.  They did not hit their original deadline with 100% functionality.  Features had to be traded in if the timelines could not move.  However, the business stakeholders were the ones who went ahead and made that call.</p>
<p>I covered this in my last &#8220;Agile&#8221; post over a year ago, but I think that it bears repeating.  Every agile project should do these steps</p>
<ol>
<li>Gather requirements</li>
<li>Estimate requirements to determine length of project</li>
<li>Work requirements in iterations</li>
<li>Gauge velocity in coding requirements against estimate</li>
<li>Determine whether your velocity requires you to either cut requirements or extend timelines</li>
<li>Lather, rinse, repeat</li>
</ol>
<p>Developers always get a bad rap for number 5 and it is always largely based on our lack of skill at number 2.  Estimating is something that developers really should improve on, however, the business needs to understand two major things.  Number 1, those timeline estimates are based on developers being able to work on the project at &#8220;perfect world&#8221; capacity &#8211; meaning 75-80% of their time.  If developers are interrupted with conflicting priorities, original estimates and timelines are null and void.  </p>
<p>Second of all, those who live in glass houses should not throw stones.  If the original requirements are so ill-planned that they need to be drastically refined or changed, then developers should be able to refine and change estimates, too, since they are basically working on a different project than the one they started with.</p>
<p>There are obviously no perfect people in this world, so that means that there is no perfect system.  Any system will invariably break down because of those imperfect people going around and &#8220;being human&#8221;.  That being said, the best way to get to nirvana is to act like the participants in Uncle Bob&#8217;s Agile Story and rely on the two C&#8217;s, &#8220;communication and compromise&#8221;.  </p>
<p>Compromising is the original agile.  Be retro.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2011/12/17/why-i-hate-agile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Mobile Strategy?</title>
		<link>http://www.peteonsoftware.com/index.php/2011/12/12/a-mobile-strategy/</link>
		<comments>http://www.peteonsoftware.com/index.php/2011/12/12/a-mobile-strategy/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 22:48:48 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Business of Software]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=396</guid>
		<description><![CDATA[Harvard Business Review published an article at the end of last month titled Building a Mobile App Is Not a Mobile Strategy. The TL;DR; version is that mobile is not an item to be marked off of a checklist. It is bad if your company just created a mobile app so that you can answer [...]]]></description>
				<content:encoded><![CDATA[<p>Harvard Business Review published an article at the end of last month titled <a href="http://blogs.hbr.org/cs/2011/11/building_a_mobile_app_is_not_a.html">Building a Mobile App Is Not a Mobile Strategy</a>.  The TL;DR; version is that mobile is not an item to be marked off of a checklist.  It is bad if your company just created a mobile app so that you can answer &#8220;yes&#8221; when the CEO asks, &#8220;Do we do mobile?&#8221;.  </p>
<p>I heard someone speak at a conference here in Ohio who was making this same point.  Some time ago, the best visual medium for advertising was the print ad.  Since that was the end of the standard understanding, when the web came about, people set out to put up what we now call &#8220;brochureware&#8221;.  Basically taking their magazine ad or brochure and putting it up on the web.  No real interaction and no reason to ever have a repeat visitor.  Hey, but at least they had an &#8220;Internet Strategy&#8221;, right? </p>
<p>The same thing is happening now.  Mobile is hot, so people are trying to create mobile apps that are nothing more than advertisements or brochureware for their product or business.  Not a lot of people &#8220;get&#8221; mobile yet, so the good ideas are coming slowly.  However, just as companies began to create interactive websites that provided a service or amusement while educating or advertising their service, that time will arrive for mobile, too.  </p>
<p><img src="http://www.peteonsoftware.com/images/201112/SitOrSquat.jpg" alt="Sit or Squat" title="Sit or Squat" style="float:left; padding:.5em;" />Even now, forward thinking companies are getting it.  The article mentions Proctor and Gamble&#8217;s sponsorship of a 3rd party application called &#8220;Sit or Squat&#8221; that helps locate public restrooms wherever you are, while at the same time keeping Charmin at the forefront of your mind and associating it with the best possible restroom experiences.</p>
<p>Having an idea or a strategy for what you will do to &#8220;accomplish&#8221; mobile is great, but the Harvard Business Review article pretty much stops there.  In my opinion, the key to having a dynamic and impactful mobile strategy isn&#8217;t just how you will market to consumers.  It encompasses how your employees will be productive.  What sorts of applications could your employees use &#8220;on the go&#8221; (in meetings, during travel, etc) on a smartphone or tablet device?  How will you deliver those applications to them?</p>
<p>The other big key to a successful mobile strategy is integration with your existing business platform.  What sorts of services or APIs does your organization have exposed to allow mobile applications to integrate with your systems?  If you have none, what would it take to create them?  <strong>This</strong> to me is the heart of a Great Mobile Strategy in the Enterprise.  It is mobile as an integrated natural evolution of your systems in a way that encourages productivity and growth.  And <strong>that</strong> is the hard part.</p>
<p>If you aren&#8217;t in a place where new applications can integrate with you, then you are in a place that is stagnant.  If every new application has to tear down and throw away what came before it, you are asking to fall behind.  A Great Mobile Strategy starts with a Great Overall IT Strategy that allows mobile to become not just something &#8220;checked off&#8221; or &#8220;bolted on&#8221; but a full-fledged member of your company&#8217;s application stack.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2011/12/12/a-mobile-strategy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
