Random Technical Stuff RSS 2.0
 Friday, July 25, 2008

My team is putting on an event in a number of different cities in the coming months.  To register, click on the link for your city:

Date City
8/26/2008 Mountain View, CA
8/28/2008 Phoenix, AZ
9/9/2008 Irvine, CA
9/10/2008 Los Angeles, CA
9/23/2008 Denver, CO
9/25/2008 Salt Lake City, UT
TBD Bellevue, WA
TBD Portland, OR

 

Here is the detailed information about the event:

Agile methods are a set of development processes intended to create software in a lighter, faster, more people-centric way. Many development teams have adopted "agile" methodologies to manage change and to improve software quality. These methodologies promote continuous integration as a practice to build and test software products incrementally as new features are included, bugs are fixed, and code is refactored.

This one-day seminar will walk provide an overview of Agile Software Development, its principles, methods and values; highlighting of the most widely used, and simplest to apply Agile method  known as "Scrum". 

Please join Microsoft and Neudesic, a Microsoft Gold Certified Partner for this one-day seminar.  Thank you, we look forward to seeing you there!

COURSE OVERVIEW

Introduction to Agile (What, Why)  |  Agile methods are fast becoming commonplace in software development practices for many organizations. However, they represent a significant paradigm shift in the way in which stakeholders and team members are engaged, projects are planned, manner in which the team reacts to change, and which teams work together.  The session will provide an overview of Agile Software Development, its principles, methods and values.  Participants will learn the reason why Agile Methods are gaining share in software projects and driving up ROI. 

Scrum Essentials  |  Several methodologies live within the space known as "Agile Software Development".  One of the most widely used, and simplest to apply Agile methods is known as "Scrum".  This session teaches the essentials of how to use "Scrum" on projects, focusing on the techniques and practices that development teams require while working on an Agile / Scrum project. The session will provide the required practices, roles and rules of Scrum, and answer specific questions about how to apply Agile Methods (via Scrum) to projects. Participants will review how a product backlog is used to plan a sprint, and learn how to read project status through a sprint backlog and burn down chart.

Agile Planning and Estimation  |  Session teaches how to plan the scope and schedule of a Scrum project, focusing on hands-on project planning techniques for Agile teams. Requires familiarity with Agile software development (or prior attendance to the above sessions).

The following areas are discussed -- how to:

  • Set up a winning project "constraint profile"
  • Manage customer / user scope expectations
  • Create a release plan
  • Create and prioritize a product backlog
  • Use relative estimating
  • Measure team velocity

Team Foundation Server |  See how Microsoft’s Team Foundation Server can support your team’s Scrum process to fully benefit from Scrum’s practices and rules.  In this session we’ll discuss how you can use TFS to leverage the Scrum essentials learned in the earlier session.

C-Level Speaker  |  In this final session, we will hear a “real-world” example of how Scrum is successfully being used today in a development organization.

AGENDA

Tuesday, September 23, 2008

8:30 AM-9:00 AM

Registration, Welcome & Breakfast

9:00 AM-10:30 AM

Introduction to Agile

10:30AM-10:45 AM

Break

10:45AM-11:45 AM

SCRUM Essentials, Part 1

11:45 PM-12:45 PM

Lunch

12: 45 PM-1:45 PM

SCRUM Essentials, Part 2

1:45 PM-2:45 PM

Agile Planning & Estimation

2:45 PM-3:00 PM

Break

3:00 PM-4:00 PM

Team Foundation Server

4:00 PM-5:00 PM

C Level Speaker

Hope to see you at one of the events.

25-Jul-2008 1:18 PM  #    Comments
Events

 Tuesday, June 03, 2008

Thanks to all who attended the Denver VSTS Event.  Mickey has posted a debrief from session on his blog including links to his slides.  I have uploaded my slides here.

3-Jun-2008 9:27 AM  #    Comments


 Wednesday, April 23, 2008

The latest MSDN Architecture Journal has been released with a focus on "The Role of an Architect".  I feel very strongly that being an architect is more than being a great technologist or understanding patterns.  People skills separate the ordinary from the very effective.  Because of that, I submitted a topic and wrote an article that appears this month about architect soft skills.  

While you are there, check out the excellent article by a peer of mine in Denver, Joseph Hofstader (it is great that we have two people in Denver contributing this month).  I enjoy any article that contains a Homer Simpson reference.

23-Apr-2008 10:01 AM  #    Comments


 Tuesday, April 22, 2008

When I am working with customers there are a couple of topics that seem to always come up - methodology and tools to support development.  My team has collaborated with one of our partners, Neudesic, to put on an all day event that focuses on these topics.  In particular, there will be a focus on Visual Studio Team System. 

However, I will be delivering a session in Denver, Irvine, and Phoenix (I had a conflict with LA) with no product focus.  I intend to discuss best practices and lessons learned around adoption of process in the development lifecycle. I am excited about this presentation because while tools are important, I find that there are many other factors that are just as critical.

If you think the day will be valuable or know someone that would enjoy it, please pass along the appropriate link:

Hope to see you there.

22-Apr-2008 3:51 PM  #    Comments


 Wednesday, April 16, 2008

I have a Blackjack II and have really liked the phone so far (although I really want a Sony Xperia X1 when it releases).  Recently I mentioned to a couple of friends how much I liked the BJII and they went out and purchased them.  They liked them also, but wanted a home screen with smaller icons so they could better maximize their real estate. 

Here is the Windows Default Layout (notice that the mail/messaging notifications are below and it is necessary to scroll down to get them).

image

Here is the layout after I changed the home screen around a little bit.  I changed to smaller icons and moved around a few of the items so my mail/messaging is above the profile.

image

I have posted the new home screen here.  If you want to try it out, save it to the XML file to your device in the Application Data\Home directory then go into your settings and change the home screen to "Default with Small Icons". 

Warning, I have not taken the time (nor do I have the ability) to internationalize the XML file so if you are using a different language than US English you should open the XML file and change the name to be appropriate for you. 

Also, if you want to move things around in the home screen, it is quite easy.  Just open the XML file and reorder the <plugin> elements to match your liking.

16-Apr-2008 4:26 PM  #    Comments
Personal Technology

 Wednesday, April 02, 2008

I wanted to thank everyone that showed up for my presentation on Office Development with Visual Studio in both Denver and Phoenix.  I wanted to put together a follow up with code samples if you are interested in digging into the topic further.

  • The first demo that I did was a Word add-in that hooked into a set of web services.  I have a posting with a how to video about creating a Word add-in here (requires the Silverlight runtime).  The specific demo that I did in Denver wires up a Word Add-In to the Northwind database.  I have posted that code here - you will need to download and install the Northwind sample database and set the connection string to get it working.  The sample I used in Phoenix was slightly different and was dependent on services that were created in other sessions.  If you were in Phoenix and want to look at some working code go ahead and download the sample above.  It is pretty much the same as the demo I did in Phoenix but hooks into a database directly rather than consuming services.  I have posted the code I wrote in Phoenix here, but the code will not work without the services back end so it would be reference code only. I also showed how to lookup the Office Icons using the Office Developer Power Tools in Phoenix.
  • In the second demo I created an Outlook add-in with some ribbon customizations and an Outlook form region.  Because the code I used in both Denver in Phoenix was dependent on the other sessions I don't have a working add-in to post.  However, I have posted the code here for you to download if you want to just see the code. 
  • In my third demo I showed how you could use System.IO.Packaging to manipulate Word documents on the server without needing to actually run Word on the server.  In Denver I used a sample that is posted here and should just work because the data is encapsulated within the project.  I have also posted my demo from Phoenix here but again it is dependent on other services so the code would be for reference only.  If you are interested in this method of working with Office documents on the server, there is a good MSDN article about this.  I also use the Word Content Control Toolkit to show how arbitrary XML can be databound to Content Controls within Word.

Hopefully you enjoyed the session and found it worth your time.  If you found this session interesting, I would recommend exploring the Office Developer area of MSDN to drill into any of the topics we discussed during the session.

2-Apr-2008 8:29 AM  #    Comments


 Tuesday, March 25, 2008

Pretty much since the time I left the Denver Launch until now I have been on the road (I am blogging this from DIA right now as I head to Seattle).  I will update this with a few more things when I get a minute to breathe, but for those of you who were interested in some of the code/topics from the Office Developer session you can check out my posting from here where I used a number of the same or similar demos.  Be early next week I will expand this posting so it maps more closely to the session.

Thanks for coming out and we will see you an another event soon.

Update: I finally have a few minutes this morning and have finally put together a more detailed post about the session.  I also wanted to publicly thank Stephen Smith from Starz for spending a few minutes with us during the developer keynote to tell us how Visual Studio 2008, WPF, WCF, and WF have been essential for their video encoding and distribution project.

25-Mar-2008 4:14 PM  #    Comments


 Friday, February 01, 2008

Thanks to all of you who attended my presentation yesterday on Live Services and the Live API - hope you had as much fun as I did.  Here are my follow up links:

General

If you just want the presentation go here, but if you want to learn more about Windows Live development visit http://dev.live.com.  I showed off the the Windows Live Quick Apps (Contoso Bicycle Club, Cotoso University, Contoso ISV, and AdventureWorks Resort) can be found on CodePlex.  Also, if you are getting more serious about developing Live applications, you should consider taking a look at the Visual Studio Tools for Live.

Virtual Earth

If you want to learn more about Virtual Earth visit the developer center and in particular the Virtual Earth Interactive SDK.  A great example of the usage of Virtual Earth are the radar maps on http://www.weather.com.  I showed off integrating in some GeoRSS feeds from MIT into a map and also showed a demo of a modified Club Site Starter Kit.

Live ID

The Live ID discussion was very lively and interesting.  I showed you the sample from the Live ID Client SDK and the Live ID Web SDK.

Live Contacts and Photos

Although we didn't do much in the way of demo we also talked a bit about Live Contacts and Live Photos.  There is a great blog posting you should visit if you are interested in Live Contacts.

Live Search

We also discussed the ability to add search to your site including the AJAX based client control and the ability to use the Interactive SDK to handle queries programmatically.

Live Messenger and Live Agents

One of the more interesting discussions we had was around Live Messenger and Live Agents.  I showed how to create a control you could drop onto a web page to embed IM communication purely through HTML.  I also showed some example agents that were pretty interesting.  If you would like to add them to your Live Messenger, search for the contact smarterchild@hotmail.com and encarta@botmetro.net.  As part of that discussion we also talked about Live Alerts.

Silverlight Streaming

I also did a quick demo that showed off embedding Silverlight Streaming applications into your web page.  There are instructions for packaging up your application for Silverlight Streaming, but I also recommend looking at the Expression Media Encoder if you are specifically looking at media.  I also really like the <iframe> method of embedding the application in your Silverlight applications in about any web page.

1-Feb-2008 4:07 PM  #    Comments
Events | Live

I recently put together a demo for The Big Event and I wanted to document how I developed this demo.  The Club Site Starter Kit is a free download for Visual Studio that comes with source code.  It contains the basics for a club site including Events, News, Photos, and Links.  In looking at the Events component, there is a locations function where a user can enter in an address for the event.  My goal was to extend the UI to provide a map view of the events in the system on the front page.

I based on lot of this work on a posting from Beth Massi which shows how to map some of the Northwind sample accounts in Virtual Earth using VB.NET which has some killer language features around XML.

To create a new Club Site, open Visual Studio and create a new website.  After you have installed the Club Site Starter Kit you will have a new project type under "My Templates".  If you create the site it will run right out of the box.  At this point you probably want to go into the ASP.NET configuration (under the Website menu) and create an administrator account.  The admin account will be required to actually update data on the site.

Now that we have the site up and running lets go through the modifications.

Extend the Database

The club site starter kit comes with a database that contains a table for locations.  I added two more fields to the database: lat and long both as varchar(50).  These fields will store the latitude and longitude associated with the address.

Get the Latitude and Longitude when creating or updating an address

One of the things that Beth discovered when putting together her sample was a website that will geocode (convert) an address to latitude and longitude using a Rest based web service.  The first step was to leverage this web service whenever a new or updated address is entered into the site on the locations.aspx page.  Since the page is bound to the database, I created two additional controls on the page that were hidden and held the latitude and longitude into both the insert and update views.  I also trapped the OnTextChanged event.

<asp:TextBox Text='<%# Bind("Address") %>' runat="server" ID="TextBox1" Rows="10" TextMode="MultiLine" Width="500px" Height="166px" OnTextChanged="TextBox1_TextChanged"></asp:TextBox>

<asp:TextBox Text='<%# Bind("lat") %>' runat="server" ID="txtLat" Visible="false" />

<asp:TextBox Text='<%# Bind("long") %>' runat="server" ID="txtLong" Visible ="false" />

In the page server code I added the following C# that handles the OnTextChanged event

protected void TextBox1_TextChanged(object sender, EventArgs e)

  {

   TextBox lng = (TextBox)(FormView1.FindControl("txtLong"));

   TextBox lat = (TextBox)(FormView1.FindControl("txtLat"));

   TextBox address = (TextBox)(FormView1.FindControl("TextBox1"));

   var url = "http://geocoder.us/service/rest/?address=" + Server.UrlEncode(address.Text);

   XNamespace nsGeo = "http://www.w3.org/2003/01/geo/wgs84_pos#";

   XElement geo;

   try

   {

     geo = XElement.Load(url);

   }

   catch (Exception ex)

   {

     //in production put in some better exception handling

     throw ex;

   }

   lng.Text = geo.Element(nsGeo + "Point").Element(nsGeo + "long").Value;

   lat.Text = geo.Element(nsGeo + "Point").Element(nsGeo + "lat").Value;  

  }

The above code encodes the address and calls the geocoder web service to obtain the latitude and longitude.  If you want to try out the service you can call it directly via your browser (for example http://geocoder.us/service/rest/?address=1600%20Pennsylvania%20Avenue%20NW%20Washington,%20DC%2020500 will give you the latitude and longitude of the White House). 

The last two lines extract the latitude and longitude from the resulting XML using LINQ to XML.  I find it much easier than trying to traverse the DOM but you can pull that information using traditional DOM code. 

One other point is that I would probably make is that this code would need to have some additional error processing when an invalid address is entered or if the geocoding service is not available.  Currently, if this particular geocoder service cannot convert the address the Club Site application will just leave these fields blank and the point will not show up on the map.  Also, this particular service isn't always as accurate as I would like (but it is free), I have had some points be off by a couple hundred yards.

Create a GeoRSS Feed

There are a couple of ways to integrate your custom data with Virtual Earth but I personally like the ability to integrate a GeoRSS feed.  If you want to find out more about programming against Virtual Earth check out the Interactive SDK.  Since I have the data stored in a database I created the feed using the following code:

using System;

using System.Collections;

using System.Configuration;

using System.Data;

using System.Linq;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.HtmlControls;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Xml.Linq;

 

 

 

public partial class GeoRSS : System.Web.UI.Page

{

    protected void Page_Load(object sender, EventArgs e)

    {

        Response.ContentType = "text/xml";

        XElement geoRSS = GetGeoRSS();

        Response.Write(geoRSS.ToString());      

    }

 

    private XElement GetGeoRSS()

    {

        NorthwindDataContext db = new NorthwindDataContext();

 

        var events = from e in db.Events

                     select new { e.id, e.title, e.description, e.starttime, e.endtime, e.LocationDetail.address, e.LocationDetail.Location_title, e.LocationDetail.lat, e.LocationDetail.@long };

 

        XNamespace nsGeo = "http://www.w3.org/2003/01/geo/wgs84_pos#";

        XNamespace nsGeorss = "http://www.georss.org/georss";

        XNamespace nsGml = "http://www.opengis.net/gml";

 

        XElement xmlFeed = new XElement("rss",

            new XAttribute("version", 2.0),

            new XAttribute(XNamespace.Xmlns + "geo", nsGeo),

            new XAttribute(XNamespace.Xmlns + "georss", nsGeorss),

            new XAttribute(XNamespace.Xmlns + "gml", nsGml),

            new XElement("channel",

                new XElement("title", "Club Events Feed"),

                new XElement("link", Request.Url.AbsoluteUri),

                new XElement("description", "Events coming up...")

            )

        );

 

        XElement xmlChannel = xmlFeed.Element("channel");

        foreach (var row in events)

        {

            xmlChannel.Add(

                new XElement("item",

                    new XElement("title", row.title),

                    new XElement("link",

                        new XAttribute("rel", "via"),

                        new XAttribute("href", "http://localhost:1589/ClubWebSite1/Events_view.aspx?EventID=" + row.id.ToString())

                    ),

                    new XElement("description", row.description),

                    new XElement("content", (string)BuildContent(row.description, row.starttime, (DateTime)row.endtime, row.address, row.Location_title),

                    new XAttribute("type", "html")),

                    new XElement(nsGml + "Point",

                        new XElement(nsGml + "pos", row.lat + " " + row.@long)

                    )

                )

            );

        }

        return xmlFeed;

    }

 

    private string BuildContent(string description, DateTime starttime, DateTime endtime, string address, string locname)

    {

        string content;

        string when = starttime.ToLongDateString() + " " + starttime.ToShortTimeString() + " - " + endtime.ToShortTimeString();

        content = "<b>" + when + "</b><br/>" + locname + "<br>" + address + "<br/><br/>" + description;

        return content;

    }

}

 

Basically the above code uses LINQ to SQL to pull the data out of the database and LINQ to XML to format the XML output.  You can create the XML in any fashion that you would like as long as it conforms to the GeoRSS standard.  The other reason I like this approach is that I can also extend this approach to filter by all sorts of criteria via querystring (if I wanted to filter by date for example). 

The actual georss.aspx html code is below.  Notice that I am not caching any information (because I use this in demos).  In a real environment I would tune the cache a little differently.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GeoRSS.aspx.cs" Inherits="GeoRSS" %>

<%Response.Expires = -1; %>

Modify the Home Page to Include the Map

At this point the heavy lifting is complete.  Now all that is left is to actually place the map on the home page and bind it to the GeoRSS feed that we created.  The one difficulty in this example is that the Club Site Starter Kit uses master pages and content pages.  This causes two issues in that we cannot easily trap the <body> tag OnLoad event and we have to programmatically inject script into the <head> secion.

I added the following C# code to inject the include script for the map control into the <head> section of the page:

    protected void Page_Load(object sender, EventArgs e)

    {

        Page.ClientScript.RegisterClientScriptInclude("VEScript", "http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6");

    }

Then I added the map to the appropriate portion of the page.  You can see that I added a <br> tag with an OnLoad event to trigger the map load.

<br onload="GetMap();" />

<div id="myMap" style="position:relative; width:446px ; height:400px"/>

Finally, I added a script for the GetMap event to render the map and wire it up to the GeoRSS feed.

<script type="text/javascript">

   var map = null;

   self.setTimeout("GetMap()", 1);  

   function GetMap()

   {

      map = new VEMap('myMap');

      map.SetDashboardSize(VEDashboardSize.Small);        

      map.LoadMap();

      var layer = new VEShapeLayer();

      var veLayerSpec = new VEShapeSourceSpecification(VEDataType.GeoRSS, "georss.aspx", layer);

      map.ImportShapeLayerData(veLayerSpec, null);

   }

</script>

The one thing I had to add that you won't find in the Interactive SDK is the self.setTimeout call.  This forces this function to load after the entire body is done rendering.

Here is the final result:

image