Powerd by dasBlog RSS 2.0
 Sunday, October 12, 2008

Yesterday I attempted my first bike to run activity. I started out with a 10.5 mile bike ride (which I wasn’t too happy with in terms of performance), followed by a 5 mile run. I had about 10 minutes of rest in-between, because even though I had “planned” this, things just didn’t work out for a quick transition.

While the bike ride was a sub-par performance, and my quads were really tight, I actually completed the 5 mile run in about 42 minutes, or about 2 to 2.5 minutes off my best 5 mile time (without riding the bike). The 42 minute time made me feel pretty good, and gives me something to shoot for in terms of improvement.

I am working on resolving two issues with my legs. The first is an IT band condition around my right knee, the second is medial tibial stress problems (shins) on both legs. Surprisingly running isn’t all that bad on the shins, and is only painful during the exercises at Monkey Bar’s (I guess that is a little unfortunate). Like I said, I’m working to get these issues resolved with the goal of being able to run 15-20 miles per week pain free by the end of January.

After establishing a good base for running, I will be working to ramp up for the Madison Marathon, as well as train for running at least one Olympic Distance triathlon in 2009. Speaking of triathlon’s, I really want to trade my bike in for a Cervelo P2C ;)

Sunday, October 12, 2008 8:40:49 PM UTC  #    Comments [0] - Trackback
Fitness

We setup all of our virtual machines in our new data center to run with a single virtual processor. The thought behind this was to start with the minimum and add additional resources as needed after observing our VM’s under load.

Well the time has come to add a second virtual processor to three of our VM’s, all of which are running Server 2008 data center edition. In the past, adding a second processor (or even enabling hyper threading) could cause issues due to an incorrect HAL (hardware abstraction layer) being chosen when you first install the OS. I thought I had read that this is not an issue under Vista and Server 2008, but couldn’t find anything to confirm (other then the lack of people reporting problems).

Since we are using virtual machines (VMWare ESX Server), it’s easy enough to take a snapshot and revert if something goes terribly wrong. However, the snapshots were NOT needed, as the servers booted up without issue after adding the second virtual processor.

Something I might want to consider next time would be to disable ESX’s dynamic resource allocation routine before shutting down three VM’s.

Sunday, October 12, 2008 8:29:03 PM UTC  #    Comments [0] - Trackback
Technology
 Tuesday, October 07, 2008

Rob Conery, creator of SubSonic, and the ASP.Net MVC Store Front video series has released an early prototype of a Visual Studio 2008 add-in called the SubSonic MVC Scaffold Addin. Let me point out right away that there is no dependency on SubSonic itself, rather this add-in uses Linq2Sql, although Rob says a SubSonic plug-in is on the drawing board.

Not to rehash his announcement, but basically this add-in takes a Linq2Sql class, and generates some views (view, edit, list), and a controller based on the class. This is meant as a quick start kind of thing, not a full fledged commercial web site generator.

I encourage you to visit his blog post and watch the video he has prepared, it does an excellent job of showing you what the Scaffold does. Here are some of my take-away's:

  • Uses pre-existing Linq2Sql generated classes
  • Creates wrapper objects around Linq2Sql classes
  • Creates MVC views (you can create your own template to use in this process)
  • Creates MVC controller
  • If you re-run the scaffold on a class you previously generated, no files are updated (overwritten). You can delete individual files, and scaffold will generate them again.
  • Not everything works perfectly, you will/may need to go in and change some code. This is to get you started with something quickly.
  • RESTful style URL
Tuesday, October 07, 2008 9:37:11 PM UTC  #    Comments [0] - Trackback
Programming | Review For Future Projects
 Monday, September 29, 2008

While in search of the Windows Live Hotmail for Outlook Connector (future blog post in the works), I found a small add-on that enables the ability to save office documents as PDF (or XPS). The add-in adds a new option under “Save As”, and worked well in my limited testing. This works different from other PDF utilities, in that it does NOT install a virtual printer driver.

The add-in is limited to the following programs, and sadly, outlook is not one of them, but all the other major office applications are:

  • Microsoft Office Access 2007
  • Microsoft Office Excel 2007
  • Microsoft Office InfoPath 2007
  • Microsoft Office OneNote 2007
  • Microsoft Office PowerPoint 2007
  • Microsoft Office Publisher 2007
  • Microsoft Office Visio 2007
  • Microsoft Office Word 2007

Remember, you access this add-in by going to “Save As”, not Print, like you may be used to for other PDF utilities. OneNote adds a new option under File, other applications may differ as well.

Info and Download:

Monday, September 29, 2008 1:21:08 PM UTC  #    Comments [0] - Trackback
Technology
 Sunday, September 28, 2008

I’ve decided to add a new non-technology related category to my blog, simple titled Fitness. I plan on blogging about various fitness activities I do, such as running, biking, swimming, general workouts at Monkey Bars, Ju-Jitsu, and race training. I should have started this in the spring, as I’m not sure how much interesting stuff I will do over the winter, but I have to start sometime.

Today I did my second 40+ mile bike ride, basically to set a baseline for next season. Like last week, I did one time around the Ironman Wisconsin loop (Verona –> Mt. Horeb –> Cross Plains –> Verona). You can view this route on MapMyRide by clicking on this link.

Today’s Status:

Time: 2:25:07
Miles: 42.8
Avg Pace: 3:23 min/mi
Avg Speed: 17.7: mi/hr
Avg HR: 139 bpm
Approx Calories Burned: 2072

This weeks ride went allot better, although it’s hard to say why. It was about 10 degrees cooler, and cloudy this week, I’m two weeks past the head cold I had instead of one, and of course I have the experience and training effort from the previous week. I didn’t ride the early hills as aggressive in an effort to save the legs, and I think it paid off.

Last week I could barely make it back to my car, and was extremely sore, this week, I feel like I could have made it around a second time, albeit slower. I think this will provide a good baseline for when I start up again next season.

I also ordered a RoadId for me and the wife. While I bring my drivers license with me, I can’t really attach it to me like the RoadId, so I have a lot better chance of it staying with me in a really bad crash or accident (knock on wood). One thing I really took away from being an Eagle Scout was “Always Be Prepared”, and for $19.99, this was just something I couldn’t pass up on.

Sunday, September 28, 2008 7:37:06 PM UTC  #    Comments [0] - Trackback
Fitness
 Tuesday, September 16, 2008

The SharePoint site I am responsible is pretty small and not used by allot of people. However, that is soon to change, as I am adding allot of content to the Wiki library for technical support and trouble shooting, and I wanted to make use of the search functionality to allow people to search for content.

So I went to the search bar, and received an error message indicating that “Your search cannot be completed because this site is not assigned to an indexer. Contact your administrator for more information.” I always find it troubling when an error message says to contact me. I started doing some searching online and made my way to the Central Administration Portal Page for our SharePoint Server. I found that you need to assign your content database to a search server, so I went to Application Management\Content Databases, selected by one and only content database, and saw that they drop down box used to select a search server was greyed out, how unfortunate.

Some more on the job training led me to Operations\Services on Server, where I saw that I was missing the “Windows SharePoint Services Search” service. Looking at the services applet under administration tools, I saw that I did have a “Windows SharePoint Services Search” service installed, and after configuring it to log on as Local System, I was able to get it started. However, I couldn’t get it to show up as a service in central administration. 

I read a couple of posts online about re-running the Sharpoint configuration wizard, so I thought I would try that. Under Start\Programs\Administrative Tools, there should be a short cut for SharePoint Products and Technologies Configuration Wizard. After starting this application, I was prompted to change various aspects of my SharePoint installation. I choose to keep everything the same. I was a little disappointed in that I didn’t see any options for adding SharePoint search, but after the wizard completed, and I went back to Operations\Services on Server, I had “Windows SharePoint Services Search” now listed, but stopped. I’m wondering if restarting the IIS Application Pool for my SharePoint server, or the Windows SharePoint Services Administration service after starting the Windows Sharepoint Services Search service would have yielded the same results?

Back in Central Administration, I clicked on the Start link in an attempt to start the Search service, but was redirected to a configuration page. On this page I was prompted to select a Service Account, Content Access Account, Search Database, and Indexing Schedule.

  • Service Account: It specifically says you can not use a built in account, such as Local Service or Network Service. I choose to use a domain service account that I used for some related services on this server. This account should be the same account as the Content Access account (read my section below about the content sources cannot be accessed error)
  • Content Access Account: This account should be separate from the service account and only have read-only access to the content database. I decided to create a new local account to achieve this. I made this account a member of the Guests local group, and added it to the data_reader role in the content database.
  • Search Database: Accepted Defaults
  • Indexing: Accepted default value of every 5 minutes to start, and then I went back and changed it Daily between 3-4 am.

After clicking start, the page took awhile to redirect, but I didn’t get any errors or warnings. I checked the Search service, and as I assumed, the log on account was changed to the domain account I specified. I also had a new database named WSS_Seach_ServerName, so it looks like things were at least setup correctly.

Jumping back to Application Management\Content Databases and selecting my lone content database, I was now able to select a search server. Running a search on my SharePoint site seemed to work, although no matches were found, which could be because the indexed had not run yet.

Five minutes later, and still no search results for obvious terms. In the Timer Status page on Central Administration, I could see that the Search Process was running every five minutes, so I went to the application log figuring errors would show up there. Sure enough, I was getting “The update cannot be started because the content sources cannot be accessed.” every five minutes. Checking my database permissions, I see that my service account has dbo permissions to the content and search databases. My content serach account, has data reader permissions to the content database (which I added previously), and dbo permissions to the search database (added automatically during setup it seems).

Back to Google. I found a discussion thread where someone stated that the Service Account and Content Access Account need to be the same, and re-affirmed the requirement that the account used only have read only permissions. So I went ahead and stopped the search service via Central Administration, deleted the search database, and then reconfigured and started the search service. The search database was re-created, and I noticed that my processor pegged at 100% for awhile and my search database grew in size from 4mb to 31 MB indicating that something actually got put in it.

Since I had stopped and reconfigured the search service, I had to reselect the search server for my specific content database under Application Management like I did before. After waiting five minutes for the indexing to run, I was getting search results.

Tuesday, September 16, 2008 11:26:00 PM UTC  #    Comments [0] - Trackback
Technology
 Tuesday, August 26, 2008

Today, Jeff Atwood posted about a deadlock issue he was having. He had a couple of ideas as to how to solve his issue, including the nolock statement. What I found most interesting were the comments that followed. Here is a summary:

  • SQL Server sucks
  • NoLock is ok
  • NoLock is a hack
  • I can’t believe you don’t/didn’t know how to fix a dead lock

I can’t believe how critical people were of Jeff. I guess I was a little surprised that the author of the great Coding Horror didn’t know the answer to something, but that’s no reason to be critical of the guy.

A couple of the more decent links included:

We have a couple of deadlock issues in our current database that I’d like to sit down and fix, so these might come in handy.

Update: Someone who knows allot more about SQL posted a blog entry in response to Jeff’s original post. The author believes that using nolock is never a good idea and goes on to give some advice on how to start solving deadlock issues.

Tuesday, August 26, 2008 3:08:25 AM UTC  #    Comments [0] - Trackback
Review For Future Projects | Sql
 Saturday, August 23, 2008

I’ve been looking at a couple of the new technologies that were released with .Net 3.5 SP1, mainly the Entity Framework (EF), and ADO.Net Data Services ADNS). I happen to look at ADO.Net Data Services first, and it seemed to look pretty good on paper. There was a reference to the Entity Framework in that Data Services uses the Entity Model (EM) from EF to provide the data access layer.

Last night I started searching for more information on the Entity Framework, and instead of finding examples, best practices, etc, I found a battle waging between the Creators/Supports of the Entity Framework and people practicing what I have come to know as Alt.Net.

I am using the term Alt.Net to refer to ideas and concepts such as Domain Driven Design (DDD), Test Driven Development (TDD), Agile, Plain Old CLR Objects (POCO), Persistence Ignorance (PI), and nHibernate (as there is allot of comparison made to the EF). I should also note that the ideas and concepts listed are not entirely specific to .Net, nor is this a complete list. Furthermore, you could be a practitioner of Alt.Net and completely support EF.

To get an idea of where the Alt.Net crowd is coming from you should start off by reading the Vote of No Confidence on WuFoo. Then simply Google for Entity Framework and you will see all sorts of competing opinions. Frans Bouma, creator of LLBLGen Pro, has a couple of posts (here, and here) that I think show he is against the EF, but for slightly difference reasons then the Alt.Net crowd. Here are some of the top Pros and Cons I’ve found.

Pros:

  1. It’s support by Microsoft, and as such, will gather much momentum and community support
  2. It’s good enough for X% (usually stated as greater then 50%) of software projects out there.
  3. GUI editor/mapper makes it easier to use then other ORM tools like nHibernate
  4. EF is part of a larger push by Microsoft to provide technologies that focus on an Entity Model (See Ado.Net Data Services)

Cons:

  1. No support for POCO’s and Persistent Ignorance
  2. Hard (or impossible) to develop using a Domain Driven Design, or Test Driven Design methodology
  3. Single model/mapping file introduces merge conflicts in a source control environment
  4. No additional functionality of products like nHibernate

I kind of see Pro #1 being the cornerstone to the argument. I feel that the Alt.Net crowd knows that EF has a good chance to become the defacto standard, and that they will be forced by their clients and employers to use it. As such, they are trying to point out some of it’s short comings to Microsoft in hopes that if it does become the defacto standard, that it won’t suck (to them) as much.

The EF team has been very open with the community, and reading posts leading up to the release of the EF, you can already see that the team was listening to the community. They introduced something called IPOCO, which removed the requirement that Entity classes implement a base class, and instead implement interfaces. This pleased some, while it annoyed others, since it still breaks true Persistent Ignorance.  I feel it’s a step in the right direction.

There are other indications that V2 of the EF will introduce true Persistant Ignorance, although the EF team usually talks about a performance hit (and it sounds like it could be a big performance hit) if you want to go the POCO route. The reason for this is the lack of the EntityKey field in a POCO object, which is used in subsequent operations after an entity is retrieved from the framework.

Overall, I find myself smack dab in the middle of the two camps. I’ve been trying to explore and learn more about Alt.Net, while at the same time keeping up on the latest from Microsoft. I’ve come up with the following guidelines for myself.

  1. Since EF is not support in Compact Framework, and I need to write business entities for the Compact Framework, or one’s that can be used in both the Full and Compact Frameworks, EF is out (so is nHibernate for that matter).
  2. If I need to work on a new back end application that is going to be using SQL server exclusively (there is support for other data stores in EF), then EF might not be a bad way to go.
  3. If I need to work on an existing back end application, I don’t think it’s worth the time to switch to EF yet, as it’s still a V1 product.

In the near term, I see my self doing some CF programming, as well as some one-off programming against our backend, which gives me a nice blend I guess. I’ll get to play around with EF some, and keep exploring the ideas of Alt.Net.

One final item I’d like to point out is the Entity Framework Contrib Project on CodePlex. While it hasn’t had a release since before RTM of the EF, it does provide some very interesting additions to the EF. The one that interests me the most, might just in fact be the bridge between the EF and POCO that everyone is looking for. Using PostSharp, the IPOCO interfaces are implemented at compile time, thus keeping your entities persistent Ignorant. The trade off is that you have to add some attributes to your code, but at least you could add these conditionally, which would help with the CF/FF issues I have.

Unfortunately the main contributor has taken a job and Microsoft on the SilverLight team, and in response to the EF’s team to add POCO support, has lost some of his interest in the project. I really like the post compile time option that the contrib project uses, as it seems to address the performance hit that the EF team says their POCO solution will have.

Saturday, August 23, 2008 7:51:13 PM UTC  #    Comments [0] - Trackback
Programming | Review For Future Projects
 Sunday, August 17, 2008

With the release of all Visual Studio 2008, TFS 2008, and SQL 2008, I set about upgrading I set about upgrading my main development laptop. Currently I have VS 2008, Team Explorer 2008 and SQL 2005 client tools installed. I opted to download the full installer for the SP1 updates as opposed to the bootstrapper options.

I knew I needed to install VS 2008 SP1 prior to TFS 2008 SP1, but for some reason decided to go with the SQL upgrade first. As I mentioned before, I currently only have the client tools installed, as I like to keep my SQL servers on virtualized development servers.

The SQL 2008 installer starts off by checking for .Net 3.5 SP1, and if it does not exist, it will install it on your machine, along with a hotfix for windows installer. After this is complete, you are required to reboot your machine. I opted for the upgrade option, hoping that everything just works. I’m not sure if you can do a side by side install with SQL 2005 client tools and 2008.

After selecting my options, an upgrade check is preformed, and it failed because I have not installed VS 2008 SP1 yet. OK, I wanted to install that anyway, so I canceled out and launched the VS 2008 SP1 installer. As with most service packs for Visual Studio it takes awhile to apply, but my experience was more positive then the service packs for VS 2005. No reboot was required, so I moved onto the TFS 2008 SP1 install.

So I must have mis-understood or did not read something with the TFS 2008 SP1 installer. It looks like it’s for the server components only, and VS 2008 SP1 handles upgrades to Team Explorer as well. This blog post makes reference to this, and even says that if you are installing Team Explorer on your TFS server, to install VS 2008 SP1. Looking at Help/About Microsoft Visual Studio, I see the version number for VS 2008 is now 9.0.30729.1 SP, and looking at the details for Team Explorer shows the same version number.

Jumping back to the SQL 2008 installer, I proceeding with my update. However it wasn’t really an update as much as it was a side by side install. Remember, I was just doing the client tools, had I had the database components installed, I assume that those would have been upgraded. I have a couple of SQL 2005 instances I can try an upgrade on to see what happens. The install went very smoothly and there were no issues.

First impressions of the new SQL Management studio are extremely positive. I saw the intelli-sense demo at the launch event, but can’t really test it as I already have SQL Prompt installed. My job as a Pseudo-DBA just got easier.Here are some new features I found.

  • When running queries, you can view the results in traditional grid view, but also as text (with options to choose your column delimiters), or export to a text (.rpt) file.
  • The new activity monitor actually provides useful information (well alot more information then the old one ever did). It reminds me of the task manager in Windows Server 2008. The new activity monitor does not work with SQL 2000, but I will be eliminating all SQL 2000 boxes by the end of September. As 4 line graphs across the top you get % Processor time, Waiting Tasks, Database I/O and Batch Requests/Sec. On the bottom you get 4 collapsible lists: Processes, Resource Waits, Data File I/O and Recent Expensive Queries.
  • The database publishing wizard from Visual Studio is now included. Actually there are a lot more options to control how your scripts are generated.
  • There are some very nice default reports built in now as well. The reports were an add-on for SQL 2005, but they are now included (and you can of course write your own). Stuff like Disk Usage, Index Usage, etc. I hope I can find a way to schedule these to be emailed.
  • New option to generate Create and Drop Script (along with the original separate options of generate create and generate drop). There is also an option to generate as SQL Agent job.

Finally I went ahead and upgraded our TFS server to SP1. First thing I did was install this month’s Windows Updates, as I was going to have to reboot anyway. Next up was Visual Studio 2008 SP1, as I have VS and Team Explorer installed. Unfortunately I was out of room on my system drive so I had to take the extra step of expanding my virtual hard disk first.

I rebooted the server, and then proceeded to install TFS 2008 SP1. It looked like everything was going good, but it failed at some point. Turns out the SQL server did not survive the reboot, VS 2008 SP1, or the system drive expansion. Somehow my mssqlsystemresource.ldf file got messed up at some point. The event log error stated “One or more files do not match the primary file of the database.”. I got better information out of the SQL error log which pointed me right to the System Resource ldf. I copied the ldf file from another SQL 2005 server and was back in business. The TFS update proceeded without incident after that. In case you are wondering, you can determine your TFS version by looking at the version of Microsoft.TeamFoundation.Server.dll in %Program Files%\Microsoft Visual Studio 2008 Team Foundation Server\Web Services\Services\bin. For SP1, the version number matches that which is displayed in Visual Studio 2008, or 9.0.30729.1.

Sunday, August 17, 2008 12:00:32 AM UTC  #    Comments [0] - Trackback
Technology | Programming | Sql
Archive
<October 2008>
SunMonTueWedThuFriSat
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2009
Adam Salvo
Sign In
Statistics
Total Posts: 176
This Year: 0
This Month: 0
This Week: 0
Comments: 10
Themes
All Content © 2009, Adam Salvo
DasBlog theme 'Business' created by Christoph De Baene (delarou)