About/Contact

Steve Trefethen

Steve Trefethen is CTO at Wanderful Media.
Contact me

View my LinkedIn profile



Calendar

<<  May 2013  >>
MoTuWeThFrSaSu
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

View posts in large calendar

Disclaimer

The posts on this weblog are provided AS IS with no warranties, and confer no rights. The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.



First day on the job at MerchantCircle

October 20 2010 8:17PM

MerchantCircleI have a new job and today marked my first day working at MerchantCircle. After a little over three years at Falafel Software where I pioneered online training and developed a custom EDI invoice/purchase order system for the largest organic grower in the country, I decided to pursue an opportunity on a whole new software stack and dig my teeth into a new programming language which I'm really excited about. If you've followed me for any length of time you'll know I previously worked at CodeGear where Ben Smith was the CEO and he happens to be the co-founder, Chairman and CEO of MerchantCircle which is no coincidence. While I'll now be commuting in the opposite direction I'll be closely following my friends at Falafel and look forward to running into them on "this side of the hill".

FacebookDel.icio.usDigg It!

Tags:

Using the TFS source control provider in CCNET v1.5 with 2010

September 24 2010 4:17PM

Recently I helped a client of Falafel's get up and running with Continuous Integration using CCNET v1.5. They’re running Team Foundation Server 2010 using TFS for their source repository and fortunately CruiseControl.NET includes a source control provider for TFS. Having tried this configuration and successfully we configured the server but ran into the following error:

Source control failure (GetModifications): Unable to find TF.exe and it was not defined in Executable Parameter

TFSError

Reviewing the code for the TFS plugin we can see why this happens for 2010:

private string ReadTFFromRegistry()
{
    string registryValue = null;

    registryValue = registry.GetLocalMachineSubKeyValue(VS2008_64_REGISTRY_PATH, VS_REGISTRY_KEY);

    if (registryValue == null)
    {
        registryValue = registry.GetLocalMachineSubKeyValue(VS2005_64_REGISTRY_PATH, VS_REGISTRY_KEY);
    }

    if (registryValue == null)
    {
        registryValue = registry.GetLocalMachineSubKeyValue(VS2008_32_REGISTRY_PATH, VS_REGISTRY_KEY);
    }

    if (registryValue == null)
    {
        registryValue = registry.GetLocalMachineSubKeyValue(VS2005_32_REGISTRY_PATH, VS_REGISTRY_KEY);
    }

    if (registryValue == null)
    {
        Log.Debug("Unable to find TF.exe and it was not defined in Executable Parameter");
        throw new Exception("Unable to find TF.exe and it was not defined in Executable Parameter");
    }

    return Path.Combine(registryValue, TF_EXE);
}

As of this writing the CCNET documentation does not include the Executable parameter for this source control provider though the fix is easy enough.

FacebookDel.icio.usDigg It!

Building a TFS project using CruiseControl.NET v1.5

September 17 2010 1:20PM

While setting up a continuous integration (CI) build in CruiseControl.NET on a project checked into Team Foundation Server (TFS) I had to make several “adjustments” to get the build working properly. This post documents the errors and what I did to get a successful build.

First, in VS.NET 2010 I created a simple WPF test project and checked it into TFS. Next, updated my CCNET server to v1.5 (v1.5.72256.1 to be exact) and edited the ccnet.config file to point to my project which looks like:

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
    <project name="WPFTest">
        <sourcecontrol type="vsts" autoGetSource="true" applyLabel="true">
          <server>http://myserver-tfs:8080/</server>
          <username>_username</username>
          <password>_password</password>
          <domain>DREAMTEAM</domain>
          <project>$/CI WPF Test</project>
          <workingDirectory>c:\projects\Foobar</workingDirectory>
          <cleanCopy>false</cleanCopy>
        </sourcecontrol>

        <tasks>
            <msbuild>
              <executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
              <workingDirectory>C:\projects\foobar\WpfApplication2</workingDirectory>
              <projectFile>WpfApplication2.sln</projectFile>
              <buildArgs>/p:Configuration=Debug /v:diag</buildArgs>
              <targets>Build</targets>
              <timeout>900</timeout>
              <logger>C:\Sandbox\ccnet\deployed\server\ThoughtWorks.CruiseControl.MSBuild.dll</logger>
            </msbuild>
        </tasks>
        <publishers>
          <xmllogger />
          <statistics />
          <modificationHistory  onlyLogWhenChangesFound="true" />
        </publishers>
    </project>
</cruisecontrol>

At that point I fired up the CCNet server from the command line and hit the Web Dashboard to force a build of the project which resulted in the error “Team Foundation Server myserver-tfs does not exist or is not accessible at this time.
Technical information (for administrator)
The request failed with HTTP status 404: Not found”

CCNET Console

The problem was the <server> tag from the ccnet.config file was missing part of the URL which should have included “/tfs” on the end. My bad.

After correcting the server URL I ran into the next error “TFS30063: You are not authorized to access http://myserver-tfs:8080/tfs.” A bit of research and I found this issue in the CCENT Jira bug database regarding a bug (and patch) for an issue in CCNET’s VS TFS source control plugin. My search also lead me to a post titled CCNET 1.5 and TFS 2010 Integration that mentions the same problem with a workaround which is to run the CCNET server under the account that has access to the TFS server.

TFS Not authorized

I fired up a new console window using my TFS account credentials with the runas.exe command as follows:

C:\Windows\System32\runas.exe /netonly /user:MYDOMAIN\STrefethen cmd.exe

I then updated my ccnet.config file removing the <username> and <password> settings from the <sourcecontrol> block. After forcing yet another build the next problem I encountered read:

“Team Foundation Server http://myserver-tfs:8080/tfs does not exist or is not accessible at this time. Technical Information (for administrator):
Team Foundation services are not available from the server.
Technical Information (for administrator):
TF253022: You must update your client with the Forward Compatibility Update in order to connect to the Team Foundation Server that you selected. To obtain this update, go to the Microsoft Web site: http://go.microsoft.com/fwlink/?LinkID=166481

Here are more explicit details of that update:

Visual Studio Team System 2008 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010 (Installer)
http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=cf13ea45-d17b-4edc-8e6c-6c5b208ec54d

After downloading and installing the update then forcing yet another build all is now working:

CCNET Web Dashboard

Hope this helps you in the event you’ve run into similar problems.

FacebookDel.icio.usDigg It!

TestComplete 8 Released

July 27 2010 9:33PM

SmartBear AutomatedQA, now SmartBear Software released TestComplete 8 this week, congrats to the Team for all their hard work!

image

FacebookDel.icio.usDigg It!

FileSystemInfo.LastWriteTime and 12/31/1600

July 08 2010 12:23AM

I’ve been working on an application tracking the age of files and if they reaches a certain threshold an error gets trigged.

FileInfo f = new FileInfo(new SystemPath(m.FolderName).Combine(m.FileName).ToString());
double totalminutes = DateTime.Now.Subtract(f.LastWriteTime).TotalMinutes;
if (totalminutes >= ErrorIntervalInMinutes)

I setup an error message to display information about the files when the error occurs and got something like this:

Error: File (d:\outbound\997_42772_06182010_1504_91.txt) File Time: 12/31/1600 4:00:00 PM Current Time: 6/18/2010 3:06:10 PM has failed to upload via FTP for 215356266.168919 minutes.

Whoa, over 400 years! That’s a lot of minutes not to mention 12/31/1600 looks a bit suspicious. A peek at the documentation for FileInfo.LastWriteTime reveals:

If the file described in the FileSystemInfo object does not exist, this property will return 12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC), adjusted to local time. 

Ah ha! The list of files being processed in this case is static and files are getting uploaded to an FTP server so clearly the file causing the error is no longer on disk thus the error. Adding an if(!f.Exists) continue; should do the trick.

Now, I didn’t investigate UTC once converted to local time resulting in 12/31/1600 vs. 1/1/1601 but I found my answer and after adding a simple check I was on my way.

FacebookDel.icio.usDigg It!

Tags: .NET | Programming

Optimizing Wireless Router Performance using Android and Wifi Analyzer

July 06 2010 11:05PM

imageWifi Analyzer on Android Wifi AnalyzerPrior to getting my Motorola Droid I hadn't thought too much about which channel my wireless router was running. In fact, I never really put too much thought into router channels at all though not long after I got my Droid I stumbled into Wifi analyzer and realized my router overlapped at least three others located near by. Fortunately the airwaves aren’t so crowded (at least not yet) finding a free channel was relatively easy.

In case you can’t tell in the image to the right there are 13 wireless routers broadcasting their signal around our house. I wonder if those questioning the new SmartMeters to be installed here in Scotts Valley have checked their existing wireless predicament?

How does your neighborhood compare?

FacebookDel.icio.usDigg It!

A week in New Orleans on the HTC EVO

June 10 2010 9:45PM

HTC EVOAll this week I’ve been in New Orleans at TechEd 2010 using the Google HTC EVO phone that I got while at Google I/O in May. The phone is on free service through Sprint for 30 days and is an incredible piece of hardware with an huge screen, very fast processor that’s been an absolute joy to use even though there are a few UI features/apps from the Droid I prefer. It’s going to be really sad to return to the Droid once the service ends as it runs circles around it.

The Falafel team here with six people has two Motorola Droids, two HTC EVO’s, one iPhone 3GS and one HTC Tilt 2. We taken tons of photos, many of which ended up being immediately posted to Facebook or sent via email. I’ve posted live streaming video to qik.com, photos and status updates to Facebook and Google Buzz, listened to podcasts, found directions to restaurants, coffee shops and all sorts of other locations, posted to Twitter read the news, posted updates to the Falafel team on Yammer, sent tons of free SMS messages via Google Voice, identified landmarks using Google Goggles, instant messaged via Meebo, tracked my travel via TripIt, connected to the web via Sprint Hot Spot countless times, scanned barcodes, installed apps and oh yeah, even made a few phone calls!

In fact, this afternoon I was working at a Starbucks connected via the Sprint Hot Spot feature sharing my connection with Falafel’s President John Waters while he was dialed into a GotoMeeting call with other Falafel employees located both here in New Orleans as well as back home in California.

Last night, we were walking along the Mississippi and caught Anderson Cooper filming AC360 where we watched the show streamed over a Slingbox to an HTC Tilt 2 located in Amarillo TX! It’s really amazing what these pocket devices can do and how close you can get to replacing a PC with one.

With Android you can literally pick up a new phone, log in with your Google account and be off in running with your contacts, email and lots of other goodness in minutes. I can’t wait to take a look at the new iPhone though I can’t imagine a case where I’d switch from Verizon to AT&T because at the end of the day I want/need to make phone calls.

As fun as all this has been, I’m ready to go home and see my family again so now it’s time to go to bed because I have to be up in a little over three hours to catch a 5:25am flight home.

FacebookDel.icio.usDigg It!