<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>DevelopmentNow</title>
  <link rel="alternate" type="text/html" href="http://www.developmentnow.com/blog/" />
  <link rel="self" href="http://www.developmentnow.com/blog/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2008-05-09T09:20:50.82-07:00</updated>
  <author>
    <name>Ben Strackany</name>
  </author>
  <subtitle>Development Tips for .NET, ASP, IIS, VB, SQL, Flash, and more</subtitle>
  <id>http://www.developmentnow.com/blog/</id>
  <generator uri="http://www.dasblog.net" version="2.0.7180.0">DasBlog</generator>
  <entry>
    <title>Slicehost and Securing SSH</title>
    <link rel="alternate" type="text/html" href="http://www.developmentnow.com/blog/Slicehost+And+Securing+SSH.aspx" />
    <id>http://www.developmentnow.com/blog/PermaLink,guid,e00a7f11-4575-4db8-a289-232f2659313a.aspx</id>
    <published>2008-05-09T09:20:50.82-07:00</published>
    <updated>2008-05-09T09:20:50.82-07:00</updated>
    <category term="Linux" label="Linux" scheme="http://www.developmentnow.com/blog/CategoryView,category,Linux.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <h4>SliceHost and Affordable Linux Hosting
</h4>
        <p>
I'm trying out a new provider, <a href="http://www.slicehost.com">SliceHost</a>, for
the upcoming Portland Open Coffee Club and Portland Open Beer Club web sites. SliceHost
provides fast &amp; affordable Linux VPSes with a variety of distros to choose from. 
</p>
        <p>
The one downside (for me at least) is that the distros come with <strong>nothing</strong> installed.
Well, I shouldn't say nothing (since SSH is on there), but no database, no web server,
no ftp, no PHP, no mail. I was surprised when I first uncovered this, since I ordered
an Ubuntu 8.04 server VPS &amp; figured it would have a normal LAMP stack installed.
But no, it's a minimal Linux install. That's so if you have specific needs, you can
install exactly what you want &amp; avoid installing anything you don't. But if you're
more of a programmer than a sysadmin ... well, you may want to check out <a href="http://www.rimuhosting.net">RimuHosting</a> for
a VPS. Great support, nice VPSes, good upgrade path, &amp; the boxes are ready for
your PHP code.
</p>
        <p>
Or if you want a bit more hand-holding, you can go with<a href="http://www.godaddy.com"> GoDaddy</a> or <a href="http://www.dreamhost.com">Dreamhost</a>.
GoDaddy's support is meh, but they're easy to get started with and are fine for a
small site. Dreamhost has better support, but recently I had a really bad performance
experience with them &amp; canceled my account.
</p>
        <p>
So anyhow, this wasn't supposed to all be about affordable Linux hosting providers
-- I was also going to mention securing SSH. 
</p>
        <h4>Securing SSH
</h4>
        <p>
I've been following PickledOnion's great <a href="http://articles.slicehost.com/2008/4/25/ubuntu-hardy-setup-page-1">Ubuntu
setup guide</a>, and it mentioned securing SSH by moving it to a different port (other
than port 22). You can basically edit <strong>/etc/ssh/sshd_config</strong>, change
the port number at the top, and then restart ssh with <strong>/etc/init.d/ssh restart</strong>. 
</p>
        <p>
Note: once you change the port, don't log out of SSH right away! Instead, open a new
SSH window &amp; try connecting to your box on the new port. If it doesn't work, you
can go back to your previous still-open SSH window &amp; troubleshoot.
</p>
        <p>
Another option in /etc/ssh/sshd_config is to disallow root access, which is definitely
a good idea. Although, if you end up SUDOing users so they have access to everything,
then it doesn't protect as much as you think, since someone who can log in as you
could do almost as much damage as root, including editing /etc/ssh/sshd_config to
switch the ports to something different and allow root back in. 
</p>
        <p>
An additional way to secure SSH is to edit your firewall to block most IPs from accessing
SSH, and block any unneeded ports. I'll refer you to the <a href="http://articles.slicehost.com/2008/4/25/ubuntu-hardy-setup-page-1">setup
guide</a> again ... scroll down &amp; you'll see the section on <strong>iptables</strong>.
</p>
        <p>
BTW, experienced Linux admins probably already know the above tips (plus more!), but
I figured there's a lot of people getting into Linux admin work these days, so some
basic admin knowledge doesn't hurt. 
</p>
        <img width="0" height="0" src="http://www.developmentnow.com/blog/aggbug.ashx?id=e00a7f11-4575-4db8-a289-232f2659313a" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Subversion: Merging Changes from a Branch into the Trunk</title>
    <link rel="alternate" type="text/html" href="http://www.developmentnow.com/blog/Subversion+Merging+Changes+From+A+Branch+Into+The+Trunk.aspx" />
    <id>http://www.developmentnow.com/blog/PermaLink,guid,8bd9cd0d-5d8c-49e3-b9a1-43d0ca70ec28.aspx</id>
    <published>2008-04-10T14:49:30.095-07:00</published>
    <updated>2008-04-10T14:49:57.173375-07:00</updated>
    <category term="Tools" label="Tools" scheme="http://www.developmentnow.com/blog/CategoryView,category,Tools.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
We don't branch or tag super often, usually just on major releases, experimental code,
or not-yet-ready code. But sometimes you'll have changes in a branch that you want
to merge back into the main development trunk. 
</p>
        <p>
So assume your project's trunk is at <strong>myproject/trunk</strong>.  You
then create a branch for a major release in <strong>myproject/branches/1.0-release</strong>.
After a few weeks, you have to fix a bug in the 1.0-release version of your project,
so you make the changes to the <strong>/myproject/branches/1.0-release</strong> branch.
Then you build, test, &amp; deploy that fixed version to production or whatever.
</p>
        <p>
But now you want to merge that fix into your trunk. The main thing to remember is
that the only changes you want to merge are the ones you made after the branch was
created. You don't want to merge the entire branch into the trunk, otherwise you'll
end up merging old code (from the branch) into the trunk, too.
</p>
        <p>
BTW you might ask why I use "branches" instead of "tags" in the above example. That's
because tags and branches are the same as far as SVN is concerned, and the main difference
is that a "tag" is supposed to be a "snapshot" of your code that you don't make changes
to (i.e. a static archive), while a "branch" is a version of the code that people
might change. Since there's always a chance that we'll need to make changes to a major
release (without accidentally including any not-yet-ready trunk changes), all our
major releases are branches, not tags. 
</p>
        <p>
Ok so enough of all that. Below are some links on this topic that I suggest you read.
</p>
        <ol>
          <li>
            <a href="http://svnbook.red-bean.com/en/1.0/ch04.html">SVN Book Chapter 4</a>. It's
a quick read, explains the principles, and shows the commands. You can skip through
some of the beginning if you already know about branching, but sections "<a href="http://svnbook.red-bean.com/en/1.0/ch04s03.html">Copying
Changes Between Branches</a>" and "<a href="http://svnbook.red-bean.com/en/1.0/ch04s04.html">Common
Use Cases for Merging</a>" have good overviews on merging changes and branches.
I'd suggest first reading the explanations and skipping the actual commands, so you
know what's going on from a high-level. 
</li>
          <li>
            <a href="http://www.sepcot.com/blog/2007/04/SVN-Merge-Branch-Trunk">SVN Branch Merging
from Michael Sepcot</a>. Nice easy SVN commands to follow, now that you understand
what's going on. If you're using Subversion from a command line, that is. 
</li>
          <li>
            <a href="http://community.postnuke.com/Wiki-MergingUsingTortoiseSVN.htm">How to Merge
using Tortoise SVN</a>. If you're a Windows developer, you're probably using TortoiseSVN.
This guide explains how to perform the merge. Remember that the changes are merged
into your local copy, so you can confirm they're ok and then commit them into SVN.</li>
        </ol>
        <p>
Happy merging!
</p>
        <img width="0" height="0" src="http://www.developmentnow.com/blog/aggbug.ashx?id=8bd9cd0d-5d8c-49e3-b9a1-43d0ca70ec28" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Portland Open Beer Club is this Thursday, April 10, 5pm, at Bailey's Taproom</title>
    <link rel="alternate" type="text/html" href="http://www.developmentnow.com/blog/Portland+Open+Beer+Club+Is+This+Thursday+April+10+5pm+At+Baileys+Taproom.aspx" />
    <id>http://www.developmentnow.com/blog/PermaLink,guid,fd043cb6-7406-48a3-b438-8c786e306180.aspx</id>
    <published>2008-04-08T09:52:29.145-07:00</published>
    <updated>2008-04-08T09:52:45.114125-07:00</updated>
    <category term="opencoffee" label="opencoffee" scheme="http://www.developmentnow.com/blog/CategoryView,category,opencoffee.aspx" />
    <content type="html">&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Portland Open Beer Club (a spinoff of the
Open Coffee Club) is meeting this Thursday 5pm at Bailey’s Taproom, 213 SW Broadway,
Portland, OR. It’s an informal meetup where entrepreneurs, developers and investors
can chat, network and grow. Very laid back, no agenda, stay as little or as long as
you want. &lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Portland Open Beer Club is different from
Open Coffee Club in that it's&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Beer
instead of coffee&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;At
5pm instead or 10am&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;usually
attended by more people &lt;/font&gt;&lt;span style="FONT-FAMILY: Wingdings"&gt;&lt;font size=3&gt;J&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;Hope to see you there! If you've never met
me before, I'm the tall blond guy in the orange jacket. &lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.developmentnow.com/blog/aggbug.ashx?id=fd043cb6-7406-48a3-b438-8c786e306180" /&gt;</content>
  </entry>
  <entry>
    <title>SQL Server Management Studio - Export Query Results to Excel</title>
    <link rel="alternate" type="text/html" href="http://www.developmentnow.com/blog/SQL+Server+Management+Studio+Export+Query+Results+To+Excel.aspx" />
    <id>http://www.developmentnow.com/blog/PermaLink,guid,09c40504-98ac-47f1-98dd-efc4db1f4440.aspx</id>
    <published>2008-04-07T15:51:58.161-07:00</published>
    <updated>2008-04-07T15:52:38.3485-07:00</updated>
    <category term="Database" label="Database" scheme="http://www.developmentnow.com/blog/CategoryView,category,Database.aspx" />
    <category term="Tools" label="Tools" scheme="http://www.developmentnow.com/blog/CategoryView,category,Tools.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
The easiest way I've found involves two steps:
</p>
        <p>
Adjust SSMS Settings
</p>
        <ol>
          <li>
Go to Tools-&gt;Options 
</li>
          <li>
Query Results-&gt;SQL Server-&gt;Results to Grid 
</li>
          <li>
Check "Include column headers when copying or saving results" 
</li>
          <li>
Click OK. 
</li>
          <li>
Note that the new settings won't affect any existing Query tabs -- you'll need to
open new ones and/or restart SSMS.</li>
        </ol>
        <p>
Now next time you run a query, do this
</p>
        <ol>
          <li>
Make sure the results are displayed in a grid (CTRL+D or Query-&gt;Results To-&gt;Results
to Grid) 
</li>
          <li>
Right click in the grid, and click Select All 
</li>
          <li>
Right click in the grid again &amp; click Copy 
</li>
          <li>
Open up a new Excel spreadsheet, and paste the data in 
</li>
          <li>
Do a global search &amp; replace, replacing "NULL" with an empty string.</li>
        </ol>
        <p>
Voila!
</p>
        <p>
I had tried before with SSMS's export to CSV feature, and it just didn't escape data
the way I needed it to. 
</p>
        <img width="0" height="0" src="http://www.developmentnow.com/blog/aggbug.ashx?id=09c40504-98ac-47f1-98dd-efc4db1f4440" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Linq to SQL: Cast Stored Procedure Results to Table Entities</title>
    <link rel="alternate" type="text/html" href="http://www.developmentnow.com/blog/Linq+To+SQL+Cast+Stored+Procedure+Results+To+Table+Entities.aspx" />
    <id>http://www.developmentnow.com/blog/PermaLink,guid,38fc4e1f-1823-4ebf-b770-989a59b36943.aspx</id>
    <published>2008-03-28T10:12:30.217-07:00</published>
    <updated>2008-03-28T10:16:47.264125-07:00</updated>
    <category term="ASP.NET" label="ASP.NET" scheme="http://www.developmentnow.com/blog/CategoryView,category,ASP.NET.aspx" />
    <category term="linq" label="linq" scheme="http://www.developmentnow.com/blog/CategoryView,category,linq.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
So you can probably tell that I've been doing a lot of LINQ lately. :) One thing I've
found is that it's easier for me to write complex queries in the database as stored
procedures or views, and then use Linq to SQL to retrieve the results, sort, filter,
do paging, etc. 
</p>
        <p>
The downside of that approach is the results normally come back as a &lt;view or proc
name&gt;Result type, instead of the actual table type. That's sometimes an issue,
because I use partial classes to give my table classes some extra functionality, and
I might want to allow updates, etc. against various tables.
</p>
        <p>
So the goal is to be able to call a view or stored procedure, but coerce those results
into a good ol' MyTable object.
</p>
        <p>
You may already know how you can drag a stored procedure or view from your database
(in Server Explorer), and drop it on top of a Table entity in the O/R designer. That
will cause the stored procedure to return results of that table's type, instead of
&lt;procname&gt;Result.
</p>
        <p>
But Rick Strahl had a <a href="http://www.west-wind.com/WebLog/posts/143814.aspx" rel="nofollow">great
post</a> from a while back explaining how you can use views, procs, &amp; dynamic
SQL, and cast those results to a specific table type using ExecuteQuery. A snippet
from Rick's post is below:
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
What's also interesting is that when you provide LINQ a query like this it still works
with the DataContext's change tracking. For example, the following code actually works
as you'd expect:
</p>
          <pre>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">IEnumerable&lt;Customer&gt;
custList <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> context11.ExecuteQuery&lt;Customer&gt;(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"select
* from Customers where CustomerId={0}"</span>, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"ALFKI"</span>);
Customer cust11 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> custList.Single&lt;Customer&gt;();
Response.Write(cust11.CompanyName); cust11.CompanyName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Alfreds
Futterkiste "</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> DateTime.Now.ToString();
context11.SubmitChanges(); custList <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> context11.ExecuteQuery&lt;Customer&gt;(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"select
* from Customers where CustomerId={0}"</span>, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"ALFKI"</span>);
cust11 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> custList.Single&lt;Customer&gt;();
Response.Write(cust11.CompanyName);</span>
          </pre>
        </blockquote>
        <p>
The cool thing (as Rick mentions) is that you don't have to do a "select * from Customers"
-- you could do a "select CompanyName, ContactName from Customers" and it will work,
too. You don't need to bring back all columns in order to successfully cast the result
to a Customer object.
</p>
        <p>
I'll post my continuing forays into Linq as I continue. One thing that remains to
be seen is whether Linq to SQL is robust enough to be helpful vs requiring me to extend
it too much to do what I want/need. 
</p>
        <img width="0" height="0" src="http://www.developmentnow.com/blog/aggbug.ashx?id=38fc4e1f-1823-4ebf-b770-989a59b36943" />
      </div>
    </content>
  </entry>
  <entry>
    <title>jQuery Cheat Sheet</title>
    <link rel="alternate" type="text/html" href="http://www.developmentnow.com/blog/jQuery+Cheat+Sheet.aspx" />
    <id>http://www.developmentnow.com/blog/PermaLink,guid,63318052-85a9-446b-b8bb-d7b99c766120.aspx</id>
    <published>2008-03-27T14:00:48.936-07:00</published>
    <updated>2008-03-27T14:00:48.936-07:00</updated>
    <category term="Frameworks" label="Frameworks" scheme="http://www.developmentnow.com/blog/CategoryView,category,Frameworks.aspx" />
    <category term="Web" label="Web" scheme="http://www.developmentnow.com/blog/CategoryView,category,Web.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yeah so this isn't brand new. But the <a href="http://www.gscottolson.com/weblog/2008/01/11/jquery-cheat-sheet/">jQuery
Cheat Sheet</a> is for version 1.2, at least. <a href="http://visualjquery.com/1.1.2.html">Visual
jQuery</a> (which I still use a lot) is only for jQuery 1.1. I sure hope someone doesn't
come out with a Visual jQuery clone for jQuery 1.2.X ... :)
</p>
        <img width="0" height="0" src="http://www.developmentnow.com/blog/aggbug.ashx?id=63318052-85a9-446b-b8bb-d7b99c766120" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Grouping in Linq to SQL vs SQL</title>
    <link rel="alternate" type="text/html" href="http://www.developmentnow.com/blog/Grouping+In+Linq+To+SQL+Vs+SQL.aspx" />
    <id>http://www.developmentnow.com/blog/PermaLink,guid,4a484a25-dd8d-48c0-9c6c-7a04b5e094b6.aspx</id>
    <published>2008-03-27T11:25:52.576-07:00</published>
    <updated>2008-03-27T11:27:44.639125-07:00</updated>
    <category term="ASP.NET" label="ASP.NET" scheme="http://www.developmentnow.com/blog/CategoryView,category,ASP.NET.aspx" />
    <category term="linq" label="linq" scheme="http://www.developmentnow.com/blog/CategoryView,category,linq.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I wanted to put up a few examples of SQL vs Linq to SQL for my future reference, since
we're using it in one of our social media projects for artists. I'm pretty handy at
SQL, but it doesn't translate exactly to Linq to SQL.
</p>
        <h4>Example 1
</h4>
        <p>
Assume you have a view called <font size="2">vev_bws_mediaVoteDownloadHistory that
votes and downloads for different media by date. So it contains columns like mediaId,
artistId, activityDate, votes, and downloads. </font></p>
        <p>
          <font size="2">If we wanted to query this view to get the total number of votes and
downloads for a given media, you could use SQL like this</font>
        </p>
        <font size="2">
          <pre>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
              <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span>     votes
= <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SUM</span>(votes),
    downloads = <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SUM</span>(downloads)<br /></span>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
              <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> vev_bws_mediaVoteDownloadHistory <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">WHERE</span> mediaId
= 12345</span>
          </pre>
          <p>
Or use Linq to SQL like this
</p>
          <pre>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">veDataContext
dc <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> veDataContext();
var totals <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> (from
v <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> dc.vev_bws_mediaVoteDownloadHistories
where v.mediaId.Equals(12345) group v by v.mediaId into h select <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> {
votes <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> h.Sum(x
=&gt; x.votes), downloads <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> h.Sum(x
=&gt; x.downloads) }).FirstOrDefault();</span>
          </pre>
          <pre>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if
(totals <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=<font color="#000000"> null)
then return; // no totals</font></span></span> Response.Write(totals.downloads); Response.Write(totals.votes); </span>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            </span>
          </pre>
        </font>
        <h4>Example 2
</h4>
        <p>
So the first example was jsut getting a few simple sums. Here's a bit more complex
example. 
</p>
        <p>
Assume you have a view called <font size="2">vev_bws_userMediaHistory that logs votes
for a given artist and his/her media. The view fields like votes, artistName, mediaName,
userId (the user who cast the vote), and voteDate (a datetime column storing the date
&amp; time of a vote). </font></p>
        <p>
So since voteDate contains dates and times, I want to display all the votes grouped
by media, artist, and date (not time). I could use SQL like this:
</p>
        <font size="2">
          <pre>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
              <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span>     votesperday
= <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SUM</span>(votes),
    date = <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CAST</span>(<span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FLOOR</span>(<span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CAST</span>(voteDate <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">as</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FLOAT</span>)) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DATETIME</span>),
    mediaName,     artistName <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> vev_bws_userMediaHistory <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">WHERE</span> userId=1 <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">GROUP</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BY</span>     <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CAST</span>(<span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FLOOR</span>(<span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CAST</span>(voteDate <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">as</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FLOAT</span>)) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DATETIME</span>),
    mediaName,     artistName <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ORDER</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BY</span><span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CAST</span>(<span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FLOOR</span>(<span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CAST</span>(voteDate <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">as</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FLOAT</span>)) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DATETIME</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DESC</span></span>
          </pre>
          <p>
Note that the CAST/FLOOR/CAST trick is used to trim off the time from a datetime,
leaving just the date portion. This allows us to sum up votes cast throughout the
day into a "votes per day" value.
</p>
          <p>
To do this in Linq to SQL I would use this:
</p>
          <pre>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">veDataContext
dc <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> veDataContext();
var votes <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> (from
v <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> dc.vev_bws_userMediaHistories
where v.userId.Equals(1) group v by <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> {
v.voteDate.Date, v.artistName, v.mediaName } into h orderby h.Key.Date descending
select <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> {
date <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> h.Key.Date,
artistName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> h.Key.artistName,
mediaName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> h.Key.mediaName,
votesperday <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> h.Sum(x
=&gt; x.votes) }); </span>
          </pre>
          <p>
The above Linq <strong>select</strong> statement allows me to reference the artistName
in my ListView via &lt;%# Eval("artistName") %&gt;. If I had instead used this <strong>select </strong>statement
</p>
          <pre>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">select <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> {
    h.Key,     votesperday <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> h.Sum(x
=&gt; x.votes) }</span>
          </pre>
          <p>
I would need to use something like &lt;%# Eval("Key.artistName") %&gt; instead.
</p>
        </font>
        <img width="0" height="0" src="http://www.developmentnow.com/blog/aggbug.ashx?id=4a484a25-dd8d-48c0-9c6c-7a04b5e094b6" />
      </div>
    </content>
  </entry>
  <entry>
    <title>LinqDataSource doesn't load child tables</title>
    <link rel="alternate" type="text/html" href="http://www.developmentnow.com/blog/LinqDataSource+Doesnt+Load+Child+Tables.aspx" />
    <id>http://www.developmentnow.com/blog/PermaLink,guid,b580ae09-d8f3-40bc-93bb-e084011e7f55.aspx</id>
    <published>2008-03-27T09:59:37.576625-07:00</published>
    <updated>2008-03-27T09:59:37.576625-07:00</updated>
    <category term="ASP.NET" label="ASP.NET" scheme="http://www.developmentnow.com/blog/CategoryView,category,ASP.NET.aspx" />
    <category term="linq" label="linq" scheme="http://www.developmentnow.com/blog/CategoryView,category,linq.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
FYI, there's a bug in the RTM LinqDataSource where child tables aren't loaded unless
you have updating or deleting enabled. Apparently if you have a LinqDataSource that
doesn't have updates or deleted enabled, ObjectTracking is turned off (for performance
reason), but deferred queries (e.g. queries to pull back child rows) aren't executed. 
</p>
        <p>
So statements like
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">&lt;%#
Eval(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"ChildTable.ChildTableField"</span>)
%&gt;</span>
        </pre>
        <p>
in your ListView, etc. won't work. 
</p>
        <p>
Annoying, needless to say. But at least now I know.
</p>
        <p>
So, there are a few options:
</p>
        <ol>
          <li>
Set EnableUpdate="true", which will enable ObjectTracking and cause deferred updates
to work 
</li>
          <li>
Add a SELECT statement in your LinqDataSource (e.g. SELECT="new (field1, field2, childTable)")
to pull back everything you need. 
</li>
          <li>
Handle the ContextCreated event to either manually set ObjectTrackingEnabled, or manually
set LoadOptions.</li>
        </ol>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> OnContextCreated(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
LinqDataSourceContextEventArgs e) { ((DataContext)e.ObjectInstance).ObjectTrackingEnabled <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">true</span>;
} OR <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> OnContextCreated(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
LinqDataSourceContextEventArgs e) { var dataLoadOptions <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataLoadOptions();
dataLoadOptions.LoadWith&lt;MyTable&gt;(t =&gt; t.ChildTable); ((DataContext)e.ObjectInstance).LoadOptions <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> dataLoadOptions;
} </span>
        </pre>
        <p>
Setting LoadOptions is normally the best approach for performance.
</p>
        <img width="0" height="0" src="http://www.developmentnow.com/blog/aggbug.ashx?id=b580ae09-d8f3-40bc-93bb-e084011e7f55" />
      </div>
    </content>
  </entry>
  <entry>
    <title>March Portland Open Coffee Club</title>
    <link rel="alternate" type="text/html" href="http://www.developmentnow.com/blog/March+Portland+Open+Coffee+Club.aspx" />
    <id>http://www.developmentnow.com/blog/PermaLink,guid,022608ae-bc26-498d-959c-7d4d2a19e83a.aspx</id>
    <published>2008-03-21T10:45:02.742-07:00</published>
    <updated>2008-03-21T10:56:23.773375-07:00</updated>
    <category term="opencoffee" label="opencoffee" scheme="http://www.developmentnow.com/blog/CategoryView,category,opencoffee.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
It's time for web-centric coffee again ... The Portland Open Coffee Club is meeting
next Wednesday, 10am, at Pier Coffee (600 NW Naito Parkway, near Glisan &amp; 3rd).
Pictures below -- Pier Coffee is a quiet, open coffee house with free wifi and a central
location. Stumptown is awesome but I think it's starting to be a bit small &amp; loud
for the growing POCC crowd. 
</p>
        <p>
What is Portland Open Coffee Club? Well, it's a laid-back, casual gathering for people
interested in startups, the web, or technology to talk, network, and meet like-minded
people. Read more at <a href="http://www.opencoffeeclub.org/">http://www.opencoffeeclub.org/</a></p>
        <p>
POCC event page on Upcoming: <a href="http://upcoming.yahoo.com/event/174640/">http://upcoming.yahoo.com/event/174640/</a></p>
        <p>
P.S. Mark your calendars for Aril 10th, 5pm, at Baileys for Portland Open Beer Club.
POBC is the same as POCC, just in the evening with beer instead of morning coffee.
</p>
        <p>
          <img src="http://farm4.static.flickr.com/3206/2347206485_1387798928.jpg?v=0" />
        </p>
        <p>
          <img src="http://farm1.static.flickr.com/155/348127522_a9d80b9087.jpg?v=0" />
        </p>
        <img width="0" height="0" src="http://www.developmentnow.com/blog/aggbug.ashx?id=022608ae-bc26-498d-959c-7d4d2a19e83a" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Grids for Project Management</title>
    <link rel="alternate" type="text/html" href="http://www.developmentnow.com/blog/Grids+For+Project+Management.aspx" />
    <id>http://www.developmentnow.com/blog/PermaLink,guid,6e2f11c2-cbc4-404b-83fe-d4f735ef0f85.aspx</id>
    <published>2008-03-20T10:23:49.789-07:00</published>
    <updated>2008-03-20T10:29:33.179625-07:00</updated>
    <category term="Management" label="Management" scheme="http://www.developmentnow.com/blog/CategoryView,category,Management.aspx" />
    <category term="ProjectManagement" label="ProjectManagement" scheme="http://www.developmentnow.com/blog/CategoryView,category,ProjectManagement.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I noticed an interesting post from Allison Beckwith about <a href="http://www.allisbe.com/2007/3/2/project-planning-grid">Project
Planning Grids</a>. She also provided links to Todd Warfel's <a href="http://toddwarfel.com/?p=16">Task
Analysis Grid</a> and Blink Interactive's <a href="http://www.blinkinteractive.com/ourexperience/essays/2006/12/objects_and_actions_analysis_1.php">Objects
&amp; Actions Analysis</a>. All three posts centered around different grid styles
&amp; focuses, but they all discussed ways to map out the different objects/features
of a project in an easy-to-understand grid, so that you can flesh out requirements,
standardize vocabulary, and understand which items need to be developed when. 
</p>
        <p>
Allison &amp; Todd's grids felt higher-level, and included color &amp; position to
denote schedule &amp; priority. Blink Interactive's grid was more detailed &amp; was
perhaps a better way to ensure you didn't miss a requirement. I could perhaps see
starting with Blink's grid to round out your featureset, and then a grid like Allison
or Todd's for planning &amp; priority.
</p>
        <p>
At DevelopmentNow we do a lot of project work, so one of the first things we do is
map out a project featureset into "chunks" and rough feature descriptions, then assemble
them into a basic dependency &amp; delivery list. One of the big aspects in project
management is getting scope right, and since there's always a tradeoff between delivery
time &amp; overall features, it's important to make sure that you haven't forgotten
a critical feature, and that everyone (including and especially the client) understands
what will be delivered when. So I can see how the additional dimensions in a grid,
along with colors, can help add additional contextual scope information without sacrificing
simplicity. 
</p>
        <p>
FYI, Todd actually prints out his grids on huge (like 6 feet wide) paper, puts them
up on a wall, and talks through them with clients, allowing the client to write on
the paper, interact with it, etc. 
</p>
        <p>
Some sample screenshots of grids below: 
</p>
        <p>
          <a href="http://www.allisbe.com/2007/3/2/project-planning-grid">
            <img src="http://allisbe.com/assets/2007/3/2/blog_grid_2.jpg" />
          </a>
        </p>
        <p>
          <a href="http://www.blinkinteractive.com/ourexperience/essays/2006/12/objects_and_actions_analysis_1.php">
            <img src="http://www.blinkinteractive.com/images/objects_fig1.png" />
          </a>
        </p>
        <p>
          <a href="http://toddwarfel.com/archives/the-task-analysis-grid/">
            <img src="http://toddwarfel.com/images/wpc/task-analysis-grid.png" />
          </a>
        </p>
        <p>
 
</p>
        <img src="http://www.developmentnow.com/blog/content/binary/task_grid_21.png" border="0" />
        <img width="0" height="0" src="http://www.developmentnow.com/blog/aggbug.ashx?id=6e2f11c2-cbc4-404b-83fe-d4f735ef0f85" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Portland Open Beer Club</title>
    <link rel="alternate" type="text/html" href="http://www.developmentnow.com/blog/Portland+Open+Beer+Club.aspx" />
    <id>http://www.developmentnow.com/blog/PermaLink,guid,ef9ca19f-beb5-4cd6-bffb-c8e3485959bf.aspx</id>
    <published>2008-03-12T11:52:06.0115888-07:00</published>
    <updated>2008-03-12T11:52:06.0115888-07:00</updated>
    <category term="opencoffee" label="opencoffee" scheme="http://www.developmentnow.com/blog/CategoryView,category,opencoffee.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I wanted to announce that the first meeting of Portand Open Beer Club will be Thursday,
tomorrow night, at <a href="http://www.baileystaproom.com/">Bailey's Taproom</a> in
downtown Portland at 5pm. 
</p>
        <p>
Portland Open Beer Club is the same format as Portland Open Coffee Club. People interested
in web, tech, or startups get together for a laid-back, agenda-free gathering, so
that entrepreneurs and developers can chat, network, and grow. The main differences
with Portland Open Beer Club is that:
</p>
        <ol>
          <li>
It's Beer instead of Coffee</li>
          <li>
It at 5pm instead of 10am</li>
        </ol>
        <p>
Event link: <a href="http://upcoming.yahoo.com/event/450110/">http://upcoming.yahoo.com/event/450110/</a></p>
        <p>
Feel free to swing by, have a pint, &amp; say hello! Of course, you don't have
to drink anything to attend, and Bailey's has a number of other beverages and small
plates available. We'll also probably be having Mexican food delivered there, in case
anyone's in the mood for dinner.
</p>
        <img width="0" height="0" src="http://www.developmentnow.com/blog/aggbug.ashx?id=ef9ca19f-beb5-4cd6-bffb-c8e3485959bf" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Roll Back Subversion Files to a Previous Version</title>
    <link rel="alternate" type="text/html" href="http://www.developmentnow.com/blog/Roll+Back+Subversion+Files+To+A+Previous+Version.aspx" />
    <id>http://www.developmentnow.com/blog/PermaLink,guid,ea2a16ba-8414-403c-ad4a-86e49a848d81.aspx</id>
    <published>2008-03-06T09:16:01.001875-08:00</published>
    <updated>2008-03-06T09:16:01.001875-08:00</updated>
    <category term="Other" label="Other" scheme="http://www.developmentnow.com/blog/CategoryView,category,Other.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Well, you can't really "roll back" commits per se, since Subversion remembers everything
you've committed. But, if you realize that your current version of a file or directory
is bad, and you need to restore that to a previous version number, you can do a <font face="Courier New">svn
copy</font> like this
</p>
        <pre>svn copy --revision 7  http://svn.yourdomain.com/svn/trunk/somefolder/myfile.php ./myfile.php</pre>
        <p>
The above command will pull down myfile.php from version 7 of your repository and
place it into your working copy. You can then check it in with
</p>
        <pre>svn commit ./myfile.php -m 'rolled back to version 7'
</pre>
        <pre>You can also roll back directories instead of just specific files.</pre>
        <img width="0" height="0" src="http://www.developmentnow.com/blog/aggbug.ashx?id=ea2a16ba-8414-403c-ad4a-86e49a848d81" />
      </div>
    </content>
  </entry>
</feed>