A Quick Link to Mythical Agile Shortcuts

I often get into debates when a group or department attempts to implement Agile, then does a half ass job, then complains about how Agile failed.  One of the issues is exactly what Ross Pettit wrote about in his Agile Journal Article, Mythical Agile Shortcuts.

These myths that he outlines are only the tip of the ice berg.  There are dozens of others that can sink, or stifle a project.  So if you’re on an Agile Project, learn these, and avoid them like the management anti-patterns they are.

Technorati Tags: Agile

del.icio.us Tags: Agile

Creating and Building Indexes

Just a few Index 101 type points of advice.

When creating an index on an existing table, that has populated data, keep in mind that it could take a long time.  If it takes too long and is initiated via the SQL Management Studio the result is very likely to be a timeout.  Ideally when creating an index via the SQL Management Studio it is good to create the index before data population.

Otherwise the best way to create an index is either via T-SQL directly or create the index and maintenance of the index via a SQL Server Job.

To setup an index via SQL Management Studio follow these quick steps.

First right click and select Indexes/Keys… and click.  A dialog will pop up.

In the dialog, first click add (#1), then name the new index appropriately (#2), and then select the actual column or columns that you want the index placed on (#3).  The results should be similar to the image below.  Once everything is set click on close.

Next click on save (circled below) and the index will be created.  Remember, if there is anything in the table there is a good change at a time out.

To do it the truly über easy way, execute the following T-SQL command.

CREATE NONCLUSTERED INDEX IX_analysis_time ON dbo.profile_stats (analysis_time)

As mentioned, the UI times out trying to build this index for me because of the rows in the table.  This table had a mere 283204 rows and took 4:40.  So you can imagine with more data how much longer it might take.  A small 10-30 second time out for the UI is good considering it locks the interface up while it is trying to create the index.  For more information on the command check out the BOL entry on MSDN for CREATE INDEX.  Also it is good to check out the general index design guidelines.  Also check out my more exhaustive best practices entry for indexes.

Keep in mind when creating a index rebuild or index reorganization job that a period of time should be taken to observe the baseline behavior of a table.  Then setup a maintenance task to run on a scheduled basis of when you observe fragmentation and other things starting to occur.  For more information on reorganizing and the specific steps and commands for fragmentation and such, read the MSDN article.

To setup a job follow these steps.

Open up SQL Server Management Studio.

Expand the SQL Server Agent.  Select the Jobs Folder and right click, on the menu select New Job….

The New Job Dialog pops up.  Fill out each of the General Section fields with pertinent information.

Next select the Steps Section.

Another sub dialog appears, add the pertinent data to this field and add whatever the maintenance command is that you wish to execute on a regular basis.

After that, click on OK and then move on to Schedules.  Again click on the New… Button to bring up another sub dialog.

A New Job Schedule sub dialog appears.  Again, you know what to do.  Add pertinent information.

Next add any Alerts… same process.

You can even setup a specific response for the alerts.

Next setup any operators or new operators that you want to receive the alert.

Select the method that will receive the error alert.

Click ok until you’re back out to the main screen.  At this point you should see the job item within the job folder.  It will run at the scheduled time or just right click on it and select the run option that way.

…and that’s it.  Build, run,  and maintain those indexes!

Building a Specific .NET Framework Version :: Tip o' The Day

I was working through changing a web project from building to .NET 3.5 to just .NET 3.0.  It was taking a little effort as I removed the .NET 3.5 features.  During that time though I had a problem with System.Web and I realized a cool feature that Visual Studio 2008 has built in.

When one selects a pervious build version, and you try to add a reference, the references that aren’t available anymore are grayed out in the Add Reference dialog.

Visual Studio 2008 Virtual Host Rabbit Multiplier

I took a ride on the MAX today, just to do some thinking and get away from downtown for a little while.  On the way back from the west side I’m sitting and just typing away at some code.  I’m not hitting F5 to run or anything, just merely typing some code and then saving, then viewing the web page.  The web page was appearing just fine.  But on the background I noticed that the virtual hosts where multiplying like rabbits!

Has anyone ever seen this?  What in the world is Visual Studio doing?  Is it just launching a new one of these every time I force a build by saving and viewing the URI?

I closed down Visual Studio 2008 but I’m watching to see if this repeats itself.

Good Coder/Engineer/Programmer

A great list was put up at inter-sections.net on how to recognise a good programmer.  Check it out, it is definitely a good read.

One of the comments (by Ashley Moran) struck me as very true also, “Also, something that has stuck with me long after I forgot where I read it (possibly the Jargon File?) is that you should look out for developers with highly-developed outside interests. Generally, the ones who excel at or show extreme dedication to their hobbies are better hackers than those that don’t.”

I would agree 100% (maybe because I have highly developed hobbies?) that people who develop their outside hobbies give them much more perspective in which to reference and resource the work they do in development each day.

Technorati Tags: Jargon,Good Programmer

del.icio.us Tags: Jargon,Good Programmer