Friday, January 28, 2011
January sum-up
Wednesday, September 29, 2010
My team is hiring
Friday, September 3, 2010
Activating an upgrade edition of Windows 7 after a clean install
In my experience, technical support calls are only frustrating because of vocabulary problems. If the customer could convey the problem using vocabulary the support rep is familiar with, and if the rep can communicate the solution using words the customer understands, bingo!
I spent a good hour on the phone today trying to activate Windows 7 after I installed a new hard drive in my MacBook Pro. I was very pleased with the outcome (I’m active!), and with the technical support rep who finally helped me. But, to get to him, I had to convince two reps before him that what I was doing warranted further help. The first rep in the Activation Center said I had an “invalid product key”, and that I would have to talk with customer support. The second rep told me they no longer support activating Windows on Mac computers with a clean install, and I would have to reinstall Windows XP, then perform an upgrade install (really?) I did not accept that answer (since it would take me the rest of the day to reinstall 2 versions of Windows AND re-setup my development machine and projects). After staying on hold for a supervisor for a few minutes he created a case number for me with the Windows technical support team.
The key vocabulary words (for those of you who may need to call and talk to someone about this yourself) are: “Custom Install” vs. “Upgrade Install”, and using the MSDT tool to change my activation file from “custom” to “upgrade” so that my product key would work.
Here is the email explaining my experience with the Windows team:
Hi Charlie,
This is Adrian with Microsoft Windows Technical Support.
It was my pleasure to work with you on your Windows service request [case # deleted]. I hope that you were happy with the service provided to you.
Based on our last conversation it appears that this service request is resolved and ready to be archived. If this is not correct or if you are not happy with the support we've provided please let us know as soon as possible. My goal is to ensure that your experience with Microsoft Windows Technical Support leaves you pleased with our products and services.
Here is a summary of the key points of the service request for your records:
ACTION:
Charlie, you were trying to activate the copy of Windows 7 Ultimate.
RESULT:
You were not able to activate Windows 7 Ultimate as got an error '0xC004f061'.
CAUSE:
You were using an upgrade DVD to do a custom installation and the activation files installed were for custom and not for upgrade.
RESOLUTION:
Charlie, we used the MSDT (Microsoft Support Diagnostic Tool), changed the activation file from custom to upgrade and activated Windows 7 Ultimate.
If you have any feedback regarding Microsoft support, we would be glad to hear from you. If you would feel more comfortable speaking with someone else regarding my service, Rajiv, my manager, would be very happy to hear your comments and suggestions. You may reach my manager by sending an email to [manager’s email address].
Thank you for contacting Microsoft Windows Technical Support.
Sunday, June 13, 2010
Geo Tracks – 12 Jun 2010
What is Geo Tracks? My first post like this was a couple years ago, and it has been more than a year since my last Geo Tracks post… mainly because of a much shorter commute, also because I don’t have a Geo anymore!
After a year of local radio and NPR, I’m taking back my 40 minutes a day. I purchased a cassette adapter so I’m back in business… I’ll log the good parts of my commuter listening here.
Hanselminutes 216 - Geek Relationship Tips with Scott's Wife. Some practical ways Scott and Mo make their marriage work. Good tips here about finances, setting expectations, assuming the best… I enjoyed it!
Hanselminutes 210 – John Lam and the Science of Fitness. I am a couch potato right now… so hearing John Lam’s enthusiasm for using sensors to calculate his power output in watts while cycling was a bit over the top for me. It is cool to hear about the types of sensors that are becoming available to every day Joes, and how it is becoming more acceptable, even expected, to share your data/progress in social apps like Twitter or Facebook. Scott even jumped on the bandwagon recently by posting his LoseIt updates to Twitter. I responded by reading about the HundredPushups and Couch to 5K programs while eating a bag of chips.
Cornerstone Simi Podcast 05/30/2010 – The End. Francis Chan’s last message to his church in Simi Valley. God has blessed me through this podcast, and I’m sad that Francis won’t be using this platform to teach anymore. I’m excited to see how God will use him next though… and the good news is I have a lot of Francis messages to catch up on.
Cornerstone Simi Podcast 05/02/2010 – Salvation. Francis compares salvation to harmonies in music, those weird 3D posters, and other things that you either “just suddenly get” or not. He who has ears, let him hear.
Saturday, June 5, 2010
Tracking SQL Server procedure and function changes
This Stack Overflow question inspired me to create a couple batch files today:
1. gen_all.cmd (creates one text file for each stored procedure and function in a database)
2. gen_since.cmd (same as gen_all.cmd, but takes a date/time parameter and only generates files for procs/funcs that were created or altered since the specified date/time)
Usage (to generate any files altered on or after Jun 5th):
gen_since 06/05/2010
I know there are some slick database change management tools out there, both OSS (Tarantino) and commercial (Redgate SQL Compare)… but I’m going to try using this simple batch file for a while as a nice, mindless way to save my DB objects as files that can be tracked in source control.
Saturday, May 29, 2010
Test driving the TekPub ASP.Net MVC2 Starter Site
I like starter sites… we use one I put together at work (I called it BlankSolution). They make it really fast to get up and running on a new project, AND to carry over improvements and best practices from project to project. They are also great for learning.
Rob Conery released an MVC 2 starter site recently which looks really interesting. Go check it out to see all the goodies it includes… then come back here to read about my experience using it to build up a real project (the NCharlie Task Board of course!)
Here we go, step by step (I’m following Rob’s blog post announcing the 0.5 release):
1. Download the bits from CodePlex, extract the zip and open the solution. Screeeech… error opening in VS 2008. Something about a bad pointer in the Web.csproj file to MSBuild “v10.0” WebApplicationTargets. A quick edit to the csproj file (changed v10.0 to v9.0) fixed that (I won’t be forking the starter project for fixes if I find them… just want to see how quickly I can get up and running tonight.)
2. Set up the app to use SubSonic (the ORM tool Rob wrote). Using Subsonic is a “for now” choice, to quickly build up the database from POCO domain classes.
- Global.asax.cs needs one change, on line 135. Change “SiteEFSession” to “SubSonicSimple”.
- SubSonicSimple.cs needs one change, on line 18, add the name of the connection string the app will use, “SiteData”.
- The Web.config file doesn’t need to change, as long as your local database instance name is “SQLEXPRESS”.
3. Add a new Class Library project to the solution to hold the domain classes. I called it “Core”. Make sure to add the “Core” project to the “Web” project’s references.
(Side note: If you read through the comments on Rob’s getting started post, he ripped some guy a new one for suggesting he put his domain entities in a separate project, and add separate “Model” classes that map between the Core and the UI… so proceed at your own risk!)
- Add the domain classes:
4. Modify HomeController.cs:
- Add ISession as a private, injected member.
- Grab all the Board records from the database, ordered by Board name, and paged
public class HomeController : Controller {
private ISession _session;
public HomeController(ISession session)
{
_session = session;
}
public ActionResult Index(int? page) {
var boards = _session.All<Board>().OrderBy(x => x.Name);
var list = new List<Board>(boards);
return View(list);
}
5. Control-F5 to build and run the site… it builds, but:
6. I had some problems.
- First, my SQL Server instance is version 2005… Rob’s Site.mdf file in the App_Data folder is v655 (2008 I think), and it would not open. I created a new “SiteData” blank database on my local instance, modify the connection string in Web.config, and tried again. Same beautiful error screen I got before.
- Second (I looked in the Event Viewer for this exception), I found this in the exception detail:
Exception information:
Exception type: InvalidOperationException
Exception message: Can't decide which property to consider the Key - you can create one called 'ID' or mark one with SubSonicPrimaryKey attribute…so, I added an “ID” property to by Board class, and tried again. Error screen.
- This time the “Index.aspx” view is expecting the model to be “Web.Model.User”, and I’m passing it a list of Board entities to choke on… that makes sense. So I changed the “Inherits” directive at the top of Index.aspx to expect IList<Core.Domain.Board>, and removed the one “EditorFor” statement on line 35, and…
It’s alive! It took me almost 2 hours to follow Rob’s getting started post to this point… I didn’t get to the part about switching SubSonic out for EF or LinqToSql. I’ll leave that, and making this into an actual Task Board, for next time.
Saturday, April 10, 2010
NCharlie Task Board – MVC Version
It’s unfortunate that paid work has to take precedence over fun blog projects like this… but that’s life! I have an hour or so tonight, so I’m jumping back in to this task board project.
Last time (February, ‘10!) I wrote about the Webforms implementation of the task board. That was a good exercise for me, because I’ll be able to take many of the patterns and tools from that little project directly into my “for pay” projects, which are still all Webforms.
This MVC version will take up more than one post; I will try to keep the posts a bit shorter, and I want to record the implementation details with enough depth that I’ll be able to use these notes later to quickly ramp up my team on MVC projects when we get there.
This (image at right) is the initial project tree from Solution Explorer. You can see some of the same elements from the Webforms version (AutoMapper, StructureMap, a Master page, an NHibernate configuration file and TransactionBoundaryModule that implements the “Session per Request” pattern for data access operations.) This UI.Mvc project references the same “Core” project that the Webforms project references.
To quickly get started with the “Model-View-Controller” pattern in this project, I created the TaskBoardController class and added one ActionResult method named “Index”:
public ActionResult Index()
{
var board = new Board("My hard coded test board", 1, 1);
var column = new Column("Col1", board);
var task = new Task("task1", column);
var model = new[] { Mapper.Map<Board, BoardViewModel>(board) };
return View(model);
}
You can see it just creates a new, hard-coded task board entity, maps it to the BoardViewModel class, and returns it.
To quickly create a View page that will accept this ActionResult, I right-click on the method name “Index” and choose “New View”:
This brings up the Add View wizard, in which I can create a new ASPX view file that is strongly typed to my BoardViewModel class, uses the Master page for my project, and puts in some initial code to display the data:
I chose “List” as the View content type, because that selection assumes I will be returning an enumerable list of models, and puts a “foreach” loop into the ASPX page (I’ll use that code later as I build up the task board… where I used the ASP Repeater control in the Webforms project, I’ll use “foreach” to create the correct HTML in this MVC view page. This is pure code-generated quick and dirty programming… which I think is dangerous if you don’t use it correctly, but valuable for quickly understanding the ingredients in an MVC web app and getting started with a screen quickly. Even though this view of the BoardViewModel doesn’t look anything like a task board yet, I think it is useful as an exercise:
To see the generated code, check out the HTML in the Index.aspx file that creates this view. I tagged this code in source control as “MVC quick start”. Next, I’ll do things right and create some tests that define a set of actions and expected behavior for the TaskBoardController.