<?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>David&#039;s Tech Tips</title>
	<atom:link href="http://davidstechtips.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidstechtips.com</link>
	<description>Getting the most out of WordPress, Windows, and Technology</description>
	<lastBuildDate>Wed, 13 Apr 2011 02:37:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Git and git-flow command line completion</title>
		<link>http://davidstechtips.com/2011/04/git-and-git-flow-command-line-completion/</link>
		<comments>http://davidstechtips.com/2011/04/git-and-git-flow-command-line-completion/#comments</comments>
		<pubDate>Wed, 13 Apr 2011 02:25:36 +0000</pubDate>
		<dc:creator>David Potter</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[git-flow]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://davidstechtips.com/?p=147</guid>
		<description><![CDATA[I switch between the command line and a GUI tool called SourceTree to manage my Git repositories.  When I first installed git-flow, I noticed that the readme talked about command line completion.  It took me a while to get around to installing it, but I have to say that it is really impressive.
Git and git-flow [...]]]></description>
			<content:encoded><![CDATA[<p>I switch between the command line and a GUI tool called <a title="SourceTree | Mercurial and Git GUI for Mac OS X" rel="nofollow" href="http://www.sourcetreeapp.com/">SourceTree</a> to manage my Git repositories.  When I first installed git-flow, I noticed that the readme talked about command line completion.  It took me a while to get around to installing it, but I have to say that it is really impressive.</p>
<p>Git and <a title="git-flow" rel="nofollow" href="https://github.com/nvie/gitflow">git-flow</a> command line completion works like the rest of bash against the file system.  It reminds me a little of PowerShell on Windows (that should tell you how much I know about bash).</p>
<p>To install command line completion on a Mac, you need to find a copy of the git-completion.bash script.  Some of the posts I read on the net seem to indicate that it should be installed with Git in a contrib folder, but I couldn&#8217;t find it (showing how new I am on a Mac), so I decided to just clone <a title="git/git at master - GitHub" rel="nofollow" href="https://github.com/git/git">Git from Git-Hub</a>.  Once I had that, I created a link to the script in my <code>~/bin</code> directory:</p>
<pre class="brush: bash;">cd ~/src/external
git clone https://github.com/git/git.git git
cd ~
mkdir bin
ln -s ~/src/external/git/contrib/completion/git-completion.bash ./git-completion.sh</pre>
<p>I did a similar thing for <a title="bobthecow/git-flow-completion - GitHub" rel="nofollow" href="https://github.com/bobthecow/git-flow-completion">git-flow-completion</a>:</p>
<pre class="brush: bash;">cd ~/src/external
git clone https://github.com/bobthecow/git-flow-completion.git git-flow-completion
cd ~/bin
ln -s ~/src/external/git-flow-completion/git-flow-completion.bash ./git-flow-completion.sh</pre>
<p>The next thing to do is to modify your <code>.bash_profile</code> to call those scripts.</p>
<pre class="brush: bash;">source ~/bin/git-completion.sh
source ~/bin/git-flow-completion.sh</pre>
<p>Now when you execute git commands from the command line, you can use tab to complete commands, branches, remotes, and features.  On top of that, it works for both local and remote elements.  Very cool!</p>
<h3>Resources</h3>
<ul>
<li><a title="Git Utilities You Can't Live Without - bitfluent" rel="nofollow" href="http://blog.bitfluent.com/post/27983389/git-utilities-you-cant-live-without">Git Utilities You Can&#8217;t Live Without</a></li>
<li><a title="git/git on master - GitHub" rel="nofollow" href="https://github.com/git/git">Git on Git-Hub</a></li>
<li><a title="nvie/gitflow - GitHub" rel="nofollow" href="https://github.com/nvie/gitflow">Git-flow on Git-Hub</a></li>
<li><a title="bobthecow/git-flow-completion - GitHub" rel="nofollow" href="https://github.com/bobthecow/git-flow-completion">Git-flow-completion on Git-Hub</a></li>
<li><a title="SourceTree | Mercurial and Git GUI for Mac OS X" rel="nofollow" href="http://www.sourcetreeapp.com/">SourceTree Mercurial and Git GUI for Mac OS X</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://davidstechtips.com/2011/04/git-and-git-flow-command-line-completion/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Defensive Programming in Cocoa (from VTM_iPhone)</title>
		<link>http://davidstechtips.com/2011/04/defensive-programming-in-cocoa-from-vtm_iphone/</link>
		<comments>http://davidstechtips.com/2011/04/defensive-programming-in-cocoa-from-vtm_iphone/#comments</comments>
		<pubDate>Sun, 10 Apr 2011 23:49:13 +0000</pubDate>
		<dc:creator>David Potter</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Objective-C]]></category>

		<guid isPermaLink="false">http://davidstechtips.com/?p=138</guid>
		<description><![CDATA[I&#8217;ve been attending the iPhone Developers Conference in Seattle hosted by Voices That Matter (check out VTM_iPhone for the Twitter stream), which has been really informative.  Easily the most informative session at the iPhone Developers Conference for me was Defensive Programming in Cocoa by Mike Ash.  On Mike&#8217;s blog he has a series called Friday [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been attending the <a title="Voices That Matter: iPhone Developers Conference Spring 2011" rel="nofollow" href="http://iphonespring2011.crowdvine.com/">iPhone Developers Conference</a> in Seattle hosted by Voices That Matter (check out VTM_iPhone for the Twitter stream), which has been really informative.  Easily the most informative session at the iPhone Developers Conference for me was <a title="Defensive Programming in Cocoa - Voices That Matter: iPhone Developers Conference Spring 2011" rel="nofollow" href="http://iphonespring2011.crowdvine.com/talks/16882">Defensive Programming in Cocoa by Mike Ash</a>.  On <a title="mikeash.com: NSBlog" rel="nofollow" href="http://mikeash.com/pyblog/">Mike&#8217;s blog</a> he has a series called Friday Q&amp;A and it appears that most of the material for his talk was taken from <a title="mikeash.com: Friday Q&amp;A 2010-08-27: Defensive Programming in Cocoa" rel="nofollow" href="http://mikeash.com/pyblog/friday-qa-2010-08-27-defensive-programming-in-cocoa.html">an article he posted in December</a> with the same name.  Two sections really stand out for me.</p>
<p><strong>Memory Management</strong> &#8211; Put all your memory management for member variables in the setter for that member variable rather than scattering it around the code.  So instead of doing this:</p>
<pre class="brush: objc;">[_myMemberVar release];</pre>
<p>do this:</p>
<pre class="brush: objc;">self.myMemberVar = nil;</pre>
<p>after implementing this:</p>
<pre class="brush: objc;">@property (retain) MyClass * myMemberVar;
@synthesize myMemberVar = _myMemberVar;</pre>
<p>or this:</p>
<pre class="brush: objc;">- (void) setMyMemberVar: (MyClass *) myMemberVar
{
    if (_myMemberVar != myMemberVar)
    {
        [_myMemberVar release];
        _myMemberVar = [myMemberVar retain];
    }
}</pre>
<p><strong>Categories</strong> &#8211; Since someone could override a method in your category with their own method making your method impossible to call, name your methods in a way to reduce that possibility.  The converse is also true.  For example, if you define a method in a category for an Apple-provided class, Apple could later come along and define that method in a class category and then all their calls will go to your method instead of theirs.</p>
<p><strong>Key-Value Observers</strong> &#8211; The only thing not covered in that article that he covered in his talk was something that I started applying immediately:  When implementing key-value observers, make sure your observer only handles the notification if it knows that it is for your class.  This is a problem because your observer could be overriding the superclass&#8217;s observer and your observer must call the superclass&#8217;s observer if the notification isn&#8217;t for you.</p>
<p>To solve this, always pass specific to your class as the context parameter to the addObserver: method.</p>
<pre class="brush: objc;">static void * s_kClassContext = &amp;amp;s_kClassContext;
...
[obj addObserver: self
      forKeyPath: &quot;foo&quot;
         options: NSKeyValueObservingOptionNew
         context: s_kClassContext];
...
- (void) observeValueForKeyPath: (NSString *) keyPath
                       ofObject: (id) object
                         change: (NSDictionary *) change
                        context: (void *) context
{
    if (context == s_kClassContext)
    {
        if ([keyPath isEqual: @&quot;location&quot;])
        {
            ...
        }
    }
    else
    {
        // Notification is not for us.
        [super observeValueForKeyPath: keyPath
                             ofObject: object
                               change: change
                              context: context];
    }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://davidstechtips.com/2011/04/defensive-programming-in-cocoa-from-vtm_iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL issue installing Gerrit on Snow Leopard Server</title>
		<link>http://davidstechtips.com/2011/03/mysql-issue-installing-gerrit-on-snow-leopard-server/</link>
		<comments>http://davidstechtips.com/2011/03/mysql-issue-installing-gerrit-on-snow-leopard-server/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 20:57:00 +0000</pubDate>
		<dc:creator>David Potter</dc:creator>
				<category><![CDATA[System Admin]]></category>
		<category><![CDATA[Gerrit]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Snow Leopard Server]]></category>

		<guid isPermaLink="false">http://davidstechtips.com/?p=135</guid>
		<description><![CDATA[I spent more time than I wanted installing Gerrit on our Snow Leopard Server at work so that we could streamline code reviews.  I&#8217;ve found dealing with diffs in email to be rather inconvenient, so I&#8217;m hoping that Gerrit will be a big help.
As I went through the process of installing Gerrit, I hit a [...]]]></description>
			<content:encoded><![CDATA[<p>I spent more time than I wanted installing Gerrit on our Snow Leopard Server at work so that we could streamline code reviews.  I&#8217;ve found dealing with diffs in email to be rather inconvenient, so I&#8217;m hoping that Gerrit will be a big help.</p>
<p>As I went through the process of installing Gerrit, I hit a speed bump at the end of the init process where it couldn&#8217;t create a required function (<code>nextval_account_id()</code>).</p>
<p>Here&#8217;s a log of what happened:</p>
<pre class="brush: plain;">$ java -jar gerrit.war init -d /Library/Gerrit/

*** Gerrit Code Review 2.1.6.1
***

*** Git Repositories
***

Location of Git repositories   [/Volumes/Data/src/git]:
Import existing repositories   [Y/n]?

*** SQL Database
***

Database server type           [MYSQL/?]:
Server hostname                [localhost]:
Server port                    [(MYSQL default)]:
Database name                  [reviewdb]:
Database username              [gerrit2]:
Change gerrit2's password      [y/N]?

*** User Authentication
***

Authentication method          [OPENID/?]:

*** Email Delivery
***

SMTP server hostname           [exchsrvr]:
SMTP server port               [(default)]:
SMTP encryption                [NONE/?]:
SMTP username                  [devbuilder]:
Change devbuilder's password   [y/N]?

*** Container Process
***

Run as                         [devbuilder]:
Java runtime                   [/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home]:
Upgrade /Library/Gerrit/bin/gerrit.war [Y/n]?
Copying gerrit.war to /Library/Gerrit/bin/gerrit.war

*** SSH Daemon
***

Listen on address              [*]:
Listen on port                 [29418]:

*** HTTP Daemon
***

Behind reverse proxy           [y/N]?
Use SSL (https://)             [y/N]?
Listen on address              [*]:
Listen on port                 [8081]:
Canonical URL                  [http://myserver.local:8081/]:

Exception in thread &quot;main&quot; com.google.gwtorm.client.OrmException: Error in mysql_nextval.sql:
CREATE FUNCTION nextval_account_id ()
  RETURNS BIGINT
  LANGUAGE SQL
  NOT DETERMINISTIC
  MODIFIES SQL DATA
BEGIN
  INSERT INTO account_id (s) VALUES (NULL);
  DELETE FROM account_id WHERE s = LAST_INSERT_ID();
  RETURN LAST_INSERT_ID();
END;

	at com.google.gerrit.server.schema.ScriptRunner.run(ScriptRunner.java:55)
	at com.google.gerrit.server.schema.SchemaCreator.create(SchemaCreator.java:103)
	at com.google.gerrit.server.schema.SchemaUpdater.update(SchemaUpdater.java:52)
	at com.google.gerrit.pgm.Init$SiteRun.upgradeSchema(Init.java:190)
	at com.google.gerrit.pgm.Init.run(Init.java:85)
	at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:76)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:155)
	at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:89)
	at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:47)
	at Main.main(Main.java:25)
Caused by: java.sql.SQLException: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2642)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2571)
	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:782)
	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:625)
	at com.google.gerrit.server.schema.ScriptRunner.run(ScriptRunner.java:53)
	... 13 more</pre>
<p>The solution is to make one change to the MySQL configuration before initializing Gerrit:</p>
<pre class="brush: sql;">SET GLOBAL log_bin_trust_function_creators=1;</pre>
<p>Thanks to <a title="Issue 386: missing mysql_nextval_id() from gerrit 2.1.1 and 2.1.1.1" href="http://code.google.com/p/gerrit/issues/detail?id=386">Anthony on the Google Group</a> for Gerrit for the answer.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidstechtips.com/2011/03/mysql-issue-installing-gerrit-on-snow-leopard-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Collapsing commits in Git</title>
		<link>http://davidstechtips.com/2011/03/collapsing-commits-in-git/</link>
		<comments>http://davidstechtips.com/2011/03/collapsing-commits-in-git/#comments</comments>
		<pubDate>Sun, 27 Mar 2011 00:07:43 +0000</pubDate>
		<dc:creator>David Potter</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://davidstechtips.com/?p=129</guid>
		<description><![CDATA[There are times with any source control system that changes are committed after which you realize that you made a mistake and need to make a quick change.  In those cases, it seems pretty silly to keep the history for both those commits.
Git supports collapsing commits natively with the git rebase command.  This command provides more [...]]]></description>
			<content:encoded><![CDATA[<p>There are times with any source control system that changes are committed after which you realize that you made a mistake and need to make a quick change.  In those cases, it seems pretty silly to keep the history for both those commits.</p>
<p>Git supports collapsing commits natively with the <code>git rebase</code> command.  This command provides more than simply collapse functionality, and the collapse functionality appears to be provided only in an interactive mode.  Paralyzed Egg has a <a title="Collapsing git repository history with rebase" href="http://paralyzedegg.blogspot.com/2010/08/collapsing-git-repository-history-with.html">good article</a> on how to do this, but there was one pitfall I fell into that wasn&#8217;t described there so I&#8217;ll provide the detailed instructions here.</p>
<p>The first step is to look at the log to determine which commits you want to collapse:</p>
<pre class="brush: plain;">$ git log -3
commit d43ace68df8a298d205fb422b3261d69bc5d19e4
Author: David Potter &lt;davidp@example.com&gt;
Date:   Sat Mar 26 15:21:29 2011 -0700

    Move README back to the root.

commit 553561e3330ea60db8a3f7baadd08ef116d22129
Author: David Potter &lt;davidp@example.com&gt;
Date:   Sat Mar 26 15:20:46 2011 -0700

    Move project files to the src directory.

commit 41a6af9de1f0e3fb84ae46c301a0252d0f861f02
Author: David Potter &lt;davidp@example.com&gt;
Date:   Tue Mar 22 11:35:14 2011 -0700

    Updated API layer</pre>
<p>In this case I had moved one too many files into the src directory and needed to move it back.  I wanted to collapse the last two commits into a single commit.  To do this, I executed the following command:</p>
<pre class="brush: plain;">$ git rebase -i HEAD~2</pre>
<p>This will bring up your editor.</p>
<blockquote><p>Note that git expects the editor to return when it is done.  I had my EDITOR environment variable defined to launch TextMate which returns immediately, which prevents this feature from working.</p></blockquote>
<p>The contents of the editor will look something like this:</p>
<pre class="brush: bash;">pick 553561e Move project files to the src directory.
pick d43ace6 Move README back to the root.

# Rebase 41a6af9..d43ace6 onto 41a6af9
#
# Commands:
#  p, pick = use commit
#  r, reword = use commit, but edit the commit message
#  e, edit = use commit, but stop for amending
#  s, squash = use commit, but meld into previous commit
#  f, fixup = like &quot;squash&quot;, but discard this commit's log message
#  x &lt;cmd&gt;, exec &lt;cmd&gt; = Run a shell command &lt;cmd&gt;, and stop if it fails
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#</pre>
<p>To merge those two into a single commit, change the second <code>pick</code> command to <code>squash</code>.  Here is the result of that edit:</p>
<pre class="brush: bash;">pick 553561e Move project files to the src directory.
squash d43ace6 Move README back to the root.

# Rebase 41a6af9..d43ace6 onto 41a6af9
#
# Commands:
#  p, pick = use commit
#  r, reword = use commit, but edit the commit message
#  e, edit = use commit, but stop for amending
#  s, squash = use commit, but meld into previous commit
#  f, fixup = like &quot;squash&quot;, but discard this commit's log message
#  x &lt;cmd&gt;, exec &lt;cmd&gt; = Run a shell command &lt;cmd&gt;, and stop if it fails
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#</pre>
<p>Save the file and exit.  Git will bring up the editor with content that looks like this:</p>
<pre class="brush: bash;"># This is a combination of 2 commits.
# The first commit's message is:

Move project files to the src directory.

# This is the 2nd commit message:

Move README back to the root.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# Not currently on any branch.
# Changes to be committed:
#   (use &quot;git reset HEAD &lt;file&gt;...&quot; to unstage)
#
#       renamed:    74-location.png -&gt; src/74-location.png
#       renamed:    ACS-Info.plist -&gt; src/ACS-Info.plist
#       renamed:    ACS.xcodeproj/project.pbxproj -&gt; src/ACS.xcodeproj/project.pbxproj
#       renamed:    ACS.xcodeproj/project.xcworkspace/contents.xcworkspacedata -&gt; src/ACS.xcodeproj/project.xcworkspace/contents.xcworkspacedata
#       renamed:    ACS_Prefix.pch -&gt; src/ACS_Prefix.pch
#       renamed:    Classes/ACSAppDelegate.h -&gt; src/Classes/ACSAppDelegate.h
#       renamed:    Classes/ACSAppDelegate.m -&gt; src/Classes/ACSAppDelegate.m
#       renamed:    Classes/BaseUrlConnection.h -&gt; src/Classes/BaseUrlConnection.h
#       renamed:    Classes/BaseUrlConnection.m -&gt; src/Classes/BaseUrlConnection.m
#       renamed:    Classes/InrixApi.h -&gt; src/Classes/InrixApi.h
#       renamed:    Classes/InrixApi.m -&gt; src/Classes/InrixApi.m
#       renamed:    Classes/MKMapView+ZoomLevel.h -&gt; src/Classes/MKMapView+ZoomLevel.h
#       renamed:    Classes/MKMapView+ZoomLevel.m -&gt; src/Classes/MKMapView+ZoomLevel.m
#       renamed:    Classes/Settings.h -&gt; src/Classes/Settings.h
#       renamed:    Classes/TileOverlay.h -&gt; src/Classes/TileOverlay.h
#       renamed:    Classes/TileOverlay.m -&gt; src/Classes/TileOverlay.m
#       renamed:    Classes/TileOverlayView.h -&gt; src/Classes/TileOverlayView.h
#       renamed:    Classes/TileOverlayView.m -&gt; src/Classes/TileOverlayView.m
#       renamed:    Classes/TrafficViewController.h -&gt; src/Classes/TrafficViewController.h
#       renamed:    Classes/TrafficViewController.m -&gt; src/Classes/TrafficViewController.m
#       renamed:    Classes/TrafficViewController.xib -&gt; src/Classes/TrafficViewController.xib
#       renamed:    GDataXMLNode.h -&gt; src/GDataXMLNode.h
#       renamed:    GDataXMLNode.m -&gt; src/GDataXMLNode.m</pre>
<p>The instructions say that all lines beginning with a # will be ignored.  That means all lines NOT beginning with a # will be included in the resulting commit message.  That wasn&#8217;t clear to me when I first read that, maybe because that message is in the middle of the buffer.  I changed this buffer to look like this:</p>
<pre class="brush: bash;"># This is a combination of 2 commits.
# The first commit's message is:

Move project files to the src directory.

# This is the 2nd commit message:

#Move README back to the root.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# Not currently on any branch.
# Changes to be committed:
#   (use &quot;git reset HEAD &lt;file&gt;...&quot; to unstage)
#
#       renamed:    74-location.png -&gt; src/74-location.png
#       renamed:    ACS-Info.plist -&gt; src/ACS-Info.plist
#       renamed:    ACS.xcodeproj/project.pbxproj -&gt; src/ACS.xcodeproj/project.pbxproj
#       renamed:    ACS.xcodeproj/project.xcworkspace/contents.xcworkspacedata -&gt; src/ACS.xcodeproj/project.xcworkspace/contents.xcworkspacedata
#       renamed:    ACS_Prefix.pch -&gt; src/ACS_Prefix.pch
#       renamed:    Classes/ACSAppDelegate.h -&gt; src/Classes/ACSAppDelegate.h
#       renamed:    Classes/ACSAppDelegate.m -&gt; src/Classes/ACSAppDelegate.m
#       renamed:    Classes/BaseUrlConnection.h -&gt; src/Classes/BaseUrlConnection.h
#       renamed:    Classes/BaseUrlConnection.m -&gt; src/Classes/BaseUrlConnection.m
#       renamed:    Classes/InrixApi.h -&gt; src/Classes/InrixApi.h
#       renamed:    Classes/InrixApi.m -&gt; src/Classes/InrixApi.m
#       renamed:    Classes/MKMapView+ZoomLevel.h -&gt; src/Classes/MKMapView+ZoomLevel.h
#       renamed:    Classes/MKMapView+ZoomLevel.m -&gt; src/Classes/MKMapView+ZoomLevel.m
#       renamed:    Classes/Settings.h -&gt; src/Classes/Settings.h
#       renamed:    Classes/TileOverlay.h -&gt; src/Classes/TileOverlay.h
#       renamed:    Classes/TileOverlay.m -&gt; src/Classes/TileOverlay.m
#       renamed:    Classes/TileOverlayView.h -&gt; src/Classes/TileOverlayView.h
#       renamed:    Classes/TileOverlayView.m -&gt; src/Classes/TileOverlayView.m
#       renamed:    Classes/TrafficViewController.h -&gt; src/Classes/TrafficViewController.h
#       renamed:    Classes/TrafficViewController.m -&gt; src/Classes/TrafficViewController.m
#       renamed:    Classes/TrafficViewController.xib -&gt; src/Classes/TrafficViewController.xib
#       renamed:    GDataXMLNode.h -&gt; src/GDataXMLNode.h
#       renamed:    GDataXMLNode.m -&gt; src/GDataXMLNode.m</pre>
<p>After saving and quitting the editor, Git prints out what it did:</p>
<pre class="brush: plain;">[detached HEAD 419d987] Move project files to the src directory.
 26 files changed, 0 insertions(+), 0 deletions(-)
 rename 74-location.png =&gt; src/74-location.png (100%)
 rename ACS-Info.plist =&gt; src/ACS-Info.plist (100%)
 rename {ACS.xcodeproj =&gt; src/ACS.xcodeproj}/project.pbxproj (100%)
 rename {ACS.xcodeproj =&gt; src/ACS.xcodeproj}/project.xcworkspace/contents.xcworkspacedata (100%)
 rename ACS_Prefix.pch =&gt; src/ACS_Prefix.pch (100%)
 rename {Classes =&gt; src/Classes}/ACSAppDelegate.h (100%)
 rename {Classes =&gt; src/Classes}/ACSAppDelegate.m (100%)
 rename {Classes =&gt; src/Classes}/BaseUrlConnection.h (100%)
 rename {Classes =&gt; src/Classes}/BaseUrlConnection.m (100%)
 rename {Classes =&gt; src/Classes}/InrixApi.h (100%)
 rename {Classes =&gt; src/Classes}/InrixApi.m (100%)
 rename {Classes =&gt; src/Classes}/MKMapView+ZoomLevel.h (100%)
 rename {Classes =&gt; src/Classes}/MKMapView+ZoomLevel.m (100%)
 rename {Classes =&gt; src/Classes}/Settings.h (100%)
 rename {Classes =&gt; src/Classes}/TileOverlay.h (100%)
 rename {Classes =&gt; src/Classes}/TileOverlay.m (100%)
 rename {Classes =&gt; src/Classes}/TileOverlayView.h (100%)
 rename {Classes =&gt; src/Classes}/TileOverlayView.m (100%)
 rename {Classes =&gt; src/Classes}/TrafficViewController.h (100%)
 rename {Classes =&gt; src/Classes}/TrafficViewController.m (100%)
 rename {Classes =&gt; src/Classes}/TrafficViewController.xib (100%)
 rename GDataXMLNode.h =&gt; src/GDataXMLNode.h (100%)
 rename GDataXMLNode.m =&gt; src/GDataXMLNode.m (100%)
 rename MainWindow.xib =&gt; src/MainWindow.xib (100%)
 rename car_256.png =&gt; src/car_256.png (100%)
 rename main.m =&gt; src/main.m (100%)
Successfully rebased and updated refs/heads/master.</pre>
<p>Here is the result:</p>
<pre class="brush: plain;">$ git log -2
commit 419d987ffbf2c70b1cad664aa2a56281e681268d
Author: David Potter &lt;davidp@example.com&gt;
Date:   Sat Mar 26 15:20:46 2011 -0700

    Move project files to the src directory.

commit 41a6af9de1f0e3fb84ae46c301a0252d0f861f02
Author: David Potter &lt;david@example.com&gt;
Date:   Tue Mar 22 11:35:14 2011 -0700

    Updated API layer</pre>
<p>If conflicts occur during this process, you can resolve them and then continue the rebase, like so:</p>
<pre class="brush: plain;">$ git rebase --continue</pre>
<p>If you decide you don&#8217;t want to continue, you can abort the operation instead:</p>
<pre class="brush: plain;">$ git rebase --abort</pre>
<p>You can see the operations that have been performed on the repository using the following command:</p>
<pre class="brush: plain;">$ git reflog --oneline

419d987 HEAD@{0}: rebase -i (squash): Move project files to the src directory.
41a6af9 HEAD@{1}: rebase -i (squash): updating HEAD
553561e HEAD@{2}: checkout: moving from master to 553561e
d43ace6 HEAD@{3}: commit: Move README back to the root.
553561e HEAD@{4}: commit: Move project files to the src directory.
41a6af9 HEAD@{5}: pull origin master: Fast-forward
ce65952 HEAD@{6}: pull origin master: Fast-forward
876b07b HEAD@{7}: pull origin master: Fast-forward
28c415e HEAD@{8}: clone: from git://server/project</pre>
]]></content:encoded>
			<wfw:commentRss>http://davidstechtips.com/2011/03/collapsing-commits-in-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mount a Mac volume on a Mac from the command line</title>
		<link>http://davidstechtips.com/2011/03/mount-a-mac-volume-on-a-mac-from-the-command-line/</link>
		<comments>http://davidstechtips.com/2011/03/mount-a-mac-volume-on-a-mac-from-the-command-line/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 00:42:13 +0000</pubDate>
		<dc:creator>David Potter</dc:creator>
				<category><![CDATA[System Admin]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://davidstechtips.com/?p=127</guid>
		<description><![CDATA[I still feel like a noob on a Mac even though I&#8217;ve been working professionally on one for almost 9 months.  Today I needed to copy files from one Mac to another and I wanted to do that all from the command line.  One way to do that is to use the mount command.  Here [...]]]></description>
			<content:encoded><![CDATA[<p>I still feel like a noob on a Mac even though I&#8217;ve been working professionally on one for almost 9 months.  Today I needed to copy files from one Mac to another and I wanted to do that all from the command line.  One way to do that is to use the mount command.  Here are the steps:</p>
<pre>cd /Volumes
mkdir remotedisk
mount -t afp afp://remotehost/shareddir remotedisk</pre>
<p>The trick here is to specify the file system (<code>-t afp</code>) and to specify the remote shared folder with the correct syntax (<code>afp://remotehost/shareddir</code>).</p>
<p>I found the man pages for mount to be less than helpful for discovering this.  However, I did find a <a href="http://www.mackb.com/Uwe/Forum.aspx/mac-uk/1022/How-to-mount-remote-AppleShare-volumes-via-the-command-line">web page</a> that helped.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidstechtips.com/2011/03/mount-a-mac-volume-on-a-mac-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bug in removeOverlay: in MKMapView</title>
		<link>http://davidstechtips.com/2010/12/bug-in-removeoverlay-in-mkmapview/</link>
		<comments>http://davidstechtips.com/2010/12/bug-in-removeoverlay-in-mkmapview/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 18:34:26 +0000</pubDate>
		<dc:creator>David Potter</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[MapKit]]></category>

		<guid isPermaLink="false">http://davidstechtips.com/?p=123</guid>
		<description><![CDATA[I&#8217;ve been developing an iPhone app on my job at INRIX that uses MapKit and have run into a number of interesting issues.  One in particular baffled me for some time, and it turns out to be (or at least appear to be) a bug in MKMapView.
The app displays traffic on a map, and on [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been developing an iPhone app on my job at <a title="INRIX" href="http://www.inrix.com/">INRIX</a> that uses MapKit and have run into a number of interesting issues.  One in particular baffled me for some time, and it turns out to be (or at least appear to be) a bug in MKMapView.</p>
<p>The app displays traffic on a map, and on iOS4 it uses an overlay to display the traffic tiles.  As the user moves around or zooms in and out, the traffic tile image must be updated, which means removing the overlay and adding a new one.  This appears to work at most zoom levels until you start zooming in closer.  In those cases, the traffic tile would appear as a big blob &#8211; very ugly.</p>
<p>Searching around the net I found a few people that had experienced the same problem.  The work-around is to ad a dummy transparent overly.  Sounds silly, but it works.</p>
<p>Here are some code snippets that work for me:</p>
<pre class="brush: objc;">- (void) loadView
{
    // ...
    _mapView = [[MKMapView alloc] init];
    _mapView.delegate = self;
    // ...
    [self.view addSubview: _mapView];
    // ...
    BOOL isOS4orAbove = ([[[UIDevice currentDevice] systemVersion] floatValue] &gt;= 4.0f);
    if (isOS4orAbove)
    {
        // Add a dummy overlay to fix a bug in MKMapView where overlays don't get removed properly.
        // https://devforums.apple.com/message/307581
        MKPolyline * dummyOverlay = [[MKPolyline alloc] init];
        [_mapView addOverlay: dummyOverlay];
        [dummyOverlay release];
    }
    // ...
}</pre>
<pre class="brush: objc;">- (MKOverlayView *) mapView: (MKMapView *) mapView viewForOverlay: (id &lt;MKOverlay&gt;) overlay
{
    if ([overlay isKindOfClass: [TileOverlay class]])
    {
        // Return view for traffic tile overlay.
    }
    else if ([overlay isKindOfClass: [MKPolyline class]])
    {
        // This is for a dummy overlay to work around a problem with overlays
        // not getting removed by the map view even though we asked for it to
        // be removed.
        MKOverlayView * dummyView = [[[MKOverlayView alloc] initWithOverlay: overlay] autorelease];
        dummyView.alpha = 0.0;
        return dummyView;
    }
    else
    {
        return nil;
    }
}</pre>
<p>The forum post that led me to this solution can be found <a title="Removing MKOverlay from MKMapView (Overlay MapView)" href="https://devforums.apple.com/message/307581">here</a>.  This appears to be a bug in MapKit.  I&#8217;d be interesting in hearing if others have encountered this problem and how you solved it.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidstechtips.com/2010/12/bug-in-removeoverlay-in-mkmapview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone Utilities for your Mac or PC</title>
		<link>http://davidstechtips.com/2010/07/iphone-utilities-for-your-mac-or-pc/</link>
		<comments>http://davidstechtips.com/2010/07/iphone-utilities-for-your-mac-or-pc/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 06:20:14 +0000</pubDate>
		<dc:creator>David Potter</dc:creator>
				<category><![CDATA[Devices]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://davidstechtips.com/2010/07/iphone-utilities-for-your-mac-or-pc/</guid>
		<description><![CDATA[I stumbled upon a couple of really good iPhone utilities for the Mac and PC from Macroplant &#8211; iPhone Explorer and Phone Disk.&#160; These apps allow you to see what is on your iPhone, iPod Touch, or iPad &#8211; pretty cool.&#160; They&#8217;re not quite as useful if the device isn&#8217;t jail-broken, but they&#8217;re still useful.
 [...]]]></description>
			<content:encoded><![CDATA[<p>I stumbled upon a couple of really good iPhone utilities for the Mac and PC from <a title="Macroplant - iPod, iPad, iPhone Transfer &amp; Conversion Software" href="http://www.macroplant.com/" rel="nofollow">Macroplant</a> &#8211; <a title="iPhone Explorer - A USB iPhone browser for Mac and PC" href="http://www.macroplant.com/iphoneexplorer/" rel="nofollow">iPhone Explorer</a> and <a title="Phone Disk - iPad, iTouch, iPhone Disk Mode for Mac and PC" href="http://www.macroplant.com/phonedisk/" rel="nofollow">Phone Disk</a>.&#160; These apps allow you to see what is on your iPhone, iPod Touch, or iPad &#8211; pretty cool.&#160; They&#8217;re not quite as useful if the device isn&#8217;t jail-broken, but they&#8217;re still useful.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="iPhoneExplorer" border="0" alt="iPhoneExplorer" src="http://davidstechtips.com/wp-content/uploads/2010/07/iPhoneExplorer.png" width="200" height="200" /> <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="PhoneDisk" border="0" alt="PhoneDisk" src="http://davidstechtips.com/wp-content/uploads/2010/07/PhoneDisk.png" width="200" height="200" /> </p>
<p>For example, they will both allow you view the app and media files that are on your device.&#160; They both allow you to copy files to and from your device as well.&#160; iPhone Explorer allows you to see all the files related to your apps as well while Phone Disk allows you to delete files on your device.&#160; iPhone Explorer provides a custom UI for viewing the contents whereas Phone Disk mounts the device as a disk, just like a USB flash drive.</p>
<p>Macroplant provides iPhone Explorer free of charge, while normally they charge for Phone Disk.&#160; Until December 2010, however, they are offering it for free.</p>
<h3>Resources</h3>
<ul>
<li><a title="iPhoneExplorer - A USB iPhone Browser for Mac and PC" href="http://www.macroplant.com/iphoneexplorer/" rel="nofollow">iPhone Explorer by Macroplant</a></li>
<li><a title="Phone Disk - iPad, iTouch, iPhone Disk Mode for Mac and PC" href="http://www.macroplant.com/phonedisk/" rel="nofollow">Phone Disk by Macroplant</a></li>
<li><a title="Use Your Mac To Explore What&#39;s On Your iPhone | Tips and Tricks | Mac360" href="http://mac360.com/index.php/mac360/comments/use-your-mac-to-explore-whats-on-your-iphone/" rel="nofollow">Use Your Mac To Explore What&#8217;s On Your iPhone</a> by Alexis Kayhill @ Mac360</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://davidstechtips.com/2010/07/iphone-utilities-for-your-mac-or-pc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a separator to the Mac OS X Dock</title>
		<link>http://davidstechtips.com/2010/07/adding-a-separator-to-the-mac-os-x-dock/</link>
		<comments>http://davidstechtips.com/2010/07/adding-a-separator-to-the-mac-os-x-dock/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 12:48:14 +0000</pubDate>
		<dc:creator>David Potter</dc:creator>
				<category><![CDATA[System Admin]]></category>
		<category><![CDATA[dividers]]></category>
		<category><![CDATA[Dock]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[separators]]></category>

		<guid isPermaLink="false">http://davidstechtips.com/2010/07/adding-a-separator-to-the-mac-os-x-dock/</guid>
		<description><![CDATA[I&#8217;m now developing iPhone apps at work which means developing on a Mac.  It&#8217;s quite a shift from Windows, so I&#8217;ve been spending time learning the ins and outs to become comfortable with the platform.
One of the things I discovered is that the Dock doesn&#8217;t provide a way in the UI to add spacers (dividers) [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m now developing iPhone apps at work which means developing on a Mac.  It&#8217;s quite a shift from Windows, so I&#8217;ve been spending time learning the ins and outs to become comfortable with the platform.</p>
<p>One of the things I discovered is that the Dock doesn&#8217;t provide a way in the UI to add spacers (dividers) between application tiles.  There are two ways to do this.</p>
<h4>Add a dummy application to the Dock</h4>
<p>This solution is really simple. <a title="Brandon Kelly" rel="nofollow" href="http://brandon-kelly.com/">Brandon Kelly</a> wrote a very simple application <a title="Dock Dividers | Brandon Kelly" rel="nofollow" href="http://brandon-kelly.com/dock-dividers">Dock Dividers</a>.  Dock Dividers is simple a collection of do-nothing applications with an application image that looks like a divider.  All you do is simply drag an application to the place in the dock where you want a spacer.  The biggest issue is that you have to make sure you don&#8217;t drag the same application to the Dock more than once.</p>
<p><img style="display: inline; margin-left: 0px; margin-right: 0px; border: 0px;" title="Dock Divider" src="http://davidstechtips.com/wp-content/uploads/2010/07/DockDivider.png" border="0" alt="Dock Divider" width="300" height="96" /></p>
<h4>Use the defaults program from Terminal to add a spacer</h4>
<p>The Dock application actually does support the concept of a spacer tile.  Apple just chose not to expose it in the UI.  To add a spacer tile, type the following sequence of commands in a Terminal window:</p>
<pre class="brush: bash;">defaults write com.apple.dock persistent-apps -array-add '{ &quot;tile-type&quot; = &quot;spacer-tile&quot;; }
killall Dock</pre>
<p>You can add as many spacer tiles as you want.  Once you&#8217;re done adding them, execute the killall command to restart the Dock.</p>
<p><img style="display: inline; border: 0px;" title="Dock Separator" src="http://davidstechtips.com/wp-content/uploads/2010/07/DockSeparator.png" border="0" alt="Dock Separator" width="301" height="90" /></p>
<p>To remove a spacer tile, simply drag it from the Dock, release it somewhere else, and watch it go up in a poof of smoke.</p>
<p>The biggest issue I see with this method is that the spacer tile is simply a space on the dock.  You don&#8217;t get to specify an image to make it look nicer.  Hmm… as I think about this, I&#8217;m sure there is a way.  Let me know if you figure it out.</p>
<h3>Resources</h3>
<ul>
<li><a title="Dock Dividers | Brandon Kelly" rel="nofollow" href="http://brondon-kelly/dock-dividers/">Dock Dividers</a> by Brandon Kelly</li>
<li><a title="Real separators for the Mac OS X Leopard dock (howto)" rel="nofollow" href="http://www.zzamboni.org/brt/2007/11/21/real-separators-for-the-leopard-dock/">Real separators for the Mac OS X Leopard dock (howto)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://davidstechtips.com/2010/07/adding-a-separator-to-the-mac-os-x-dock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging .NET Web Services</title>
		<link>http://davidstechtips.com/2010/07/debugging-net-web-services/</link>
		<comments>http://davidstechtips.com/2010/07/debugging-net-web-services/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 22:46:08 +0000</pubDate>
		<dc:creator>David Potter</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://davidstechtips.com/2010/07/debugging-net-web-services/</guid>
		<description><![CDATA[I’ve been spending a lot of time lately debugging web services and I’ve been getting frustrated with the client timing out on me, so I finally buckled down and figured out how to prevent it.
Web Services consist of two parts – a client and a server.  The client is implemented as a class derived from [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been spending a lot of time lately debugging web services and I’ve been getting frustrated with the client timing out on me, so I finally buckled down and figured out how to prevent it.</p>
<p>Web Services consist of two parts – a client and a server.  The client is implemented as a class derived from <code>System.Web.Services.Protocols.WebClientProtocol</code>, e.g. through <code>SoapHttpClientProtocol</code> or <code>HttpWebClientProtocol</code>.</p>
<p>When a client calls a method on a web service, an asynchronous message is sent to the web service and the client waits for it to complete.  The client doesn’t wait forever, however.  The default timeout is 100 seconds (100,000 ms).  To change this, you must set the <code>Timeout</code> property on the web service client object, like so:</p>
<pre class="brush: csharp;">MyWebService client = new MyWebService();
client.Timeout = System.Threading.Timeout.Infinite;</pre>
<p>The <code>Timeout</code> property contains a value representing the number of milliseconds to wait for calls to return before throwing a <code>System.Net.WebException</code> exception.  To prevent it from timing out altogether, specify either <code>-1</code> or <code>System.Threading.Timeout.Infinite</code>.</p>
<h4>Reources</h4>
<ul>
<li><a title="Error: Timeout Wile Debugging Web Services" rel="nofollow" href="http://msdn.microsoft.com/en-us/library/47096yt2.aspx">Error: Timeout Wile Debugging Web Services</a> @ MSDN</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://davidstechtips.com/2010/07/debugging-net-web-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unexpected precompiled header error C1859 on Windows 7</title>
		<link>http://davidstechtips.com/2010/06/unexpected-precompiled-header-error-c1859-on-windows-7/</link>
		<comments>http://davidstechtips.com/2010/06/unexpected-precompiled-header-error-c1859-on-windows-7/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 22:11:36 +0000</pubDate>
		<dc:creator>David Potter</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>

		<guid isPermaLink="false">http://davidstechtips.com/2010/06/unexpected-precompiled-header-error-c1859-on-windows-7/</guid>
		<description><![CDATA[I’m one of the few developers at my company that is using Windows 7.  Most of the projects in the solution I am working with are C#, but some are C++.  Periodically I get the following error building every single source file in the C++ project on my machine:
fatal error C1859: 'Debug\MyProject.pch' unexpected precompiled header [...]]]></description>
			<content:encoded><![CDATA[<p>I’m one of the few developers at my company that is using Windows 7.  Most of the projects in the solution I am working with are C#, but some are C++.  Periodically I get the following error building every single source file in the C++ project on my machine:</p>
<pre class="brush: plain; light: true; wrap-lines: true;">fatal error C1859: 'Debug\MyProject.pch' unexpected precompiled header error, simply rerunning the compiler might fix this problem</pre>
<p>Nothing I did seemed to solve the problem short of rebooting, which seems to be a common experience (see <a title="Precompiled header fatal error | Microsoft Connect" rel="nofollow" href="http://connect.microsoft.com/VisualStudio/feedback/details/298766/precompiled-header-fatal-error">here</a> and <a title="Compiler / PCH File Format Question" rel="nofollow" href="http://social.msdn.microsoft.com/Forums/en/vclanguage/thread/908bf8f2-8fa1-4e7d-9b1a-787df59f0f17">here</a>).  Today I stumbled upon a <a title="Visual C++ Precompiled Header Errors on Windows 7 - Visual C++ Team Blog" rel="nofollow" href="http://blogs.msdn.com/b/vcblog/archive/2009/11/12/visual-c-precompiled-header-errors-on-windows-7.aspx">post on the Visual C++ Team Blog</a> that explains what is going on.</p>
<p>It turns out that the anti-malware improvements in Windows 7 are the culprit.  PCH files are implemented basically as a memory dump, including pointers.  This worked fine on previous versions of Windows, but Windows 7 upped the ante making this approach unworkable.</p>
<p>The new behavior that fixes this problem is available in Visual Studio 2010.  The Visual C++ team has also released a <a title="Fix for Visual C++ 2008 SP1 compiler error C1859" rel="nofollow" href="http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=25785">hotfix for Visual Studio 2008 SP1</a> with the fix.</p>
<h4>Resources</h4>
<ul>
<li><a title="Visual C++ Precompiled Header Errors on Windows 7 - Visual C++ Team Blog" rel="nofollow" href="Visual C++ Precompiled Header Errors on Windows 7">Visual C++ Precompiled Header Errors on Windows 7</a> by Visual C++ Team</li>
<p><a title="Fix for Visual C++ 2008 SP1 compiler error C1859" rel="nofollow" href="http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=25785">Fix for Visual C++ 2008 SP1 compiler error C1859</a> on Microsoft Connect</ul>
]]></content:encoded>
			<wfw:commentRss>http://davidstechtips.com/2010/06/unexpected-precompiled-header-error-c1859-on-windows-7/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

