Tuesday, December 8, 2009

Redirecting with web.config

Here is how to redirect a web site to another location using web.config in ASP.NET:

   1:  <?xml version="1.0" encoding="UTF-8"?>
   2:  <configuration>
   3:      <system.webServer>
   4:          <httpRedirect enabled="true" 
   5:                        destination="http://www.digitalhoneycomb.com" 
   6:                        exactDestination="true" 
   7:                        httpResponseStatus="Permanent" />
   8:      </system.webServer>
   9:  </configuration>

Thursday, July 23, 2009

Zero to Plinqo in 90 minutes

PlinqoWhat is Plinqo? Plinqo is a collection of CodeSmith templates designed to work with LINQ to SQL.  Here are the steps I took to go from knowing very little about Plinqo to being ready to implement in my next development project.
1) Download a CodeSmith Trial
2) Install CodeSmith
3) Download Plinqo
4) Watch 16 minute Quick Start video See notes below.
5) Watch 22 minute Feature Overview video
See notes below.

Quick Start Video Notes

  • Plinqo provides DBML, business entities, and manager/queries.
  • Running the quick start generates three projects: Data, Test and UI.
  • In the Data project there a .dbml file is generated along with /entities/ in single files and /managers/ folders.
  • To use the Plinqo gernated projects in your project just add references to CodeSmith.Data and the auto-geneated .Data.

Feature Overview Video

  • The DBML inherits database schema changes
  • The DBML persists changes to DBML mappings 
  • Meta data updates are perserved through merging
  • Plinqo can be used to create a powerful business rules engine

Plinqo overs a lot of automated horsepower in wiring up database schema to business objects.  Templates can be generated in both C# and VB.

Tuesday, May 26, 2009

FogBugz SQL Maintenance

I have used and have been an avid fan of FogBugz for years.  One quirk that I experience when running on Microsoft SQL Standard or SQL Express is that the database grows very quickly.  Even so, it can be reduced back to an acceptable size by running a simple script.  I am now running FogBugz 6.1 and using SQL Server 2008 Express, 64-bit.

Here is the SQL maintenance script:

USE FogBugz
GO
ALTER DATABASE FogBugz
SET RECOVERY SIMPLE;
GO
DBCC SHRINKFILE ([FOGBUGZ DATABASE FILE DatabaseName],1);
DBCC SHRINKFILE ([FOGBUGZ LOG FILE LogFileName],1);
GO
ALTER DATABASE FogBugz
SET RECOVERY FULL
GO

Since I am running SQL Express edition, there is no built-in support to run maintenance packages, so I use the command line OSQL to run the script above.

Here is the command line:

osql -ic:\tools\fb_shrink.sql -E -S.\SQLEXPRESS -oc:\tools\fogbugz_shrink_results.txt

I saved that command in a BAT file and then scheduled using the system scheduled tasks to be executed once daily.

Thursday, April 16, 2009

What to do with old software

OldSoftware Podcast #15 from IBM Fellow Grady Booch explores the Nine Things to Do With Old Software.  Here is the list, but you'll need to listen to his podcast to get the dialogue, discussion and details.

1) Abandon it.
2) Give it away.
3) Ignore it.
4) Put it on life support
5) Rewrite it.
6) Harvest from it.
7) Wrap it up.
8) Transform it.
9) Preserve it.

You are what you read

YouAreWhatYouRead Philippe Kruchtenn at the University of British Columbia published an article entitled You Are What You Read in the Career Development section of IEEESoftware, March/April 2009.  In the article he indicates that his favorite interview question is to ask the candicate what they have read lately.  He goes on to discuss what to read: books, journals, blogs; when to read; and how to retain what you've read.  He develops the concept of a fieldstone to use a sort of bookmark with notes.  Near the conclusion of the article is a real gem, a link to a list of the Top 100 Best Software Engineering Books as listed by Jurgen Appello, the CIO at ISM eCompany in The Netherlands.  I noticed that the author of the book I recently reviewed, Steve McConnell, has four books in the top 100 list with Software Project Survival Guide as #47.

Tuesday, April 14, 2009

Software Project Survival Guide

I just finished an excellent book by software project management guru and author Steve McConnell. After over twelve years in the IT industry as a developer, business analyst, team leader, project manager, architect, engineer and consultant, I was expecting this book to a be a good review and in many ways it was. But as the title implies, it is an excellent guide. It took me through areas of the trade that I am very familiar with and it introduced me to a few more tools and techniques that I'm anxious to put to use. As the author describes, he uses three main references in writing the book: The Capability Maturity Model Integration (CMMI) from theSoftware Engineering Institute (SEI) at Carnegie Mellon University in Pittsburgh PA, NASA Software Engineering Laboratory's (SEL's) Recommended Approach to Software Development, Revision 3, and third, his own experience which itself is extensive.  I highly recommend this book to any one leading or supporting software development projects.

Thursday, January 8, 2009

Free Tools to Build a Web Presence

In the last month and a half I've built out a launch page site at KellyOrr.com, a professional blog at ContinuousRefactor.com, a personal blog at 43five.com and a photo stream at Fotographiti.com.  Aside from the hosting space, I have used a suite of free tools.  Here is the list:
Retaggr - the Definitive Online Profile.  This service dynamically builds and serves out the badge that appears on KellyOrr.com and ContinuousRefactor.com with a collection of logos for each social network on online service that I use.  It shows a brief description of who I am, my picture and my last Twitter update.
Facebook - helps you connect and share with the people in your life.  This site is primarly used for personal social networking.  It enables you to link with colleagues and friends and share udpates, photos and Facebook-enabled games.
LinkedIn - Over 30 million professionals use LinkedIn to exchange information, ideas and opportunities.  The network enables users to stay updates about colleagues as they move between jobs.  I used it to keep an ever-current online resume of my professional activities.
Twitter. I often call this micro-blogging.  Twitter enables you to update your status from anywhere you have access to a web browser. 
Ping.fm - a simple service that makes updating your social networks a snap.  I type my updates into the website at Ping.fm and each social network that I have identified in my account is updated automatically.
Flickr - a Yahoo! service for storing pictures online.  Admittedly, I do pay for the Pro version of this service, the free version is very powerful and only puts limits on daily uploads. 
Flickriver - this service creates a photo stream of pictures from a flickr account.  I like how it presents the pictures and allows users to search by keywords and sort by tags.
BlogEngine.NET -- BE.N, as it's often referred to by fellow developers, is my blog software of choice.  It’s simple, effective, skin-able, written in .NET and free.  I run my personal and professional blogs from it.
Skype -- I used to pay more than $50 per month for a land line and dial tone with no voicemail or caller ID out here on the countryside.  Now that land-based high speed Internet is available, I got rid of my home-office land line and use Skype instead.  For a dedicated number, I pay about $5 a quarter!  Skype-to-Skype calls are free and people can call my Skype number from anywhere in the world and I can take the call anywhere in the world that I can get access to the Internet and Skype.  I've used the service and my account in Germany and Russia with no problems.
Gmail -- For years I insisted on using my own domain names and Microsoft Outlook for email.  I still use my own domain names, but I got rid of Outlook when I realized I have access to Google’s search horsepower in a GMail account.  I no longer have hundreds of nested folders that I sort mail into.  All of my mail gets tagged and added to a single archive folder.  Now I search instead of sort.
Amazon.com -- I signed up for an Amazon.com Associate account.  When I write book reviews or list books referenced in talks that I've attended, the pictures of the books come from Amazon.  If a reader clicks the book, they are transferred over to Amazon and if they buy the book, I receive a commission from Amazon.
Google Analytics -- I've used several web traffic analytics tools over the years, but they all pale in comparison to Google Analytics.  The basic version is extremely powerful and, of course, free.  Once you sign up for your account, Google will generate a simple snippet of code for you to add to your website.  That code will send information about each visitor to Google for analysis.  The aggregated data is presented in numerous reports for your review via a web interface.
Clustrmaps -- This service provides a push pin style map of where your readers are located.  The more visitors you have from a location, the bigger the head of the push pin.  This map is available as a dynamic graphic to include on your site.  The service is free.