Posts Tagged ‘SQL’

February 24th, 2008

Nick Berardi’s Essential Software for 2008

Every developer has their favorite tool collection that they must have in order to survive while developing software. The list below is indispensable in my day-to-day activities and that is why I am sharing it with my readers. My list was inspired by Scott Hanselman’s own list of tools that he uses. However I would be really interested to see what Scott’s actual list is since it would be almost impossible to touch each and every tool once a week as he claims. Because many of them serve the same purpose.

The goal of my list is to keep the tool list up to date with my current tool set. So if I stop using a tool it will drop to the bottom of the list in a section called Not Using Anymore.

Creative Commons License This list is licensed under a slightly different license than the rest of my site. So please do not reproduce this work in it’s entirety. I would rather you link to http://www.coderjournal.com/essential-software/, because work like this takes much of my time. And I am going to do everything that I can to make sure the links stay relevant and up to date. You have this pledge from me, because the links below are also my source for downloading these tools.

Development Tools

  • Notepad++
    This is a great program because it will open up any text based file and allow for quick editing. Also has built in context menu integration.
  • WinMerge
    This is still my favorite merge application, I know others have a growing following. But this is my chosen merge application because many of the others tools, check for and integrate this tool with their own to provide a free collaboration toolset.
  • PuTTY
    PuTTY is a wonderfully portable tool that doesn’t require an installation and can easily allow you to make SSH connections to any source that you may need to. I personally use it to create a tunnel in to my home network, which provides me complete access to all my computers via remote desktop with out exposing them on the internet.
  • PowerShell
    PowerShell allows for some advanced script processing and is readily being integrated in to many Microsoft projects. Now is a great time for developers to jump on board.
  • Reflector
    Reflector allows you to peer in to the .NET assemblies and view the code in your preferred language.
  • CodeSmith
    Great tool for generating any type of code that you may need from a template.
  • Fiddler
    This tool is one of my favorites because it allows me to watch the HTTP requests and view the headers. Fiddler acts as a proxy between for your HTTP connections.
  • NRegEx
    This JavaScript based tool RegEx evaluator is a great way to quickly test your regular expressions.
  • RhinoMock
    I have just started using RhinoMock for my unit testing and it really is an amazing piece of code.
  • WireShark
    WireShark use to be called Ethereal and monitors all network connections that pass through your network card.
  • Microsoft Network Monitor
    Microsofts answer to WireShark.
  • URL Rewriter and Reverse Proxy
    This is my own URL Rewriter and Reverse Proxy that I have developed. It uses the Apache style mod_rewrite syntax, so it should be familiar to most developers who have worked with Apache in the past. It is not very hard to understand so anybody can easily pickup the syntax.
  • Microsoft Best Practices Analyzer
    This is a great tool that analyzes your setup on your server and makes recommendations around best practices.
  • Visual Studio Team System 2008 Team Foundation Server Power Tools
    Extra power tools that provide access additional tools that were not shipped with the Gold Version of TFS 2008. It also includes an Team Foundation Server Analyzer that makes sure you server is setup properly.
  • Visual Studio 2005 Team Foundation Server Power Tools
    Same as above only for TFS 2005.
  • Team Foundation Server Administration Tool
    This is a great tool that lets you set permissions for each project in your server. Sometimes the permissions aren’t set correctly for each project for all the servers required, including SharePoint, SQL Reporting, and TFS. This can occur in installations were users are not defined by groups.
  • Visual Studio Express
    Don’t think this one needs explaining.
  • SQL 2005 Express
    Don’t think this one needs explaining either.
  • GhostDoc
    This is a wonderful tool that lets you document your source code pretty quickly. One thing I really love this tool for is that it helps me make self documenting code, because inorder for GhostDoc to work the methods and properties have to have some English flow to them.
  • TortoiseSVN
    Great tool with Windows Explorer Integration that allows you to work with the SVN source control server directly though Explorer.
  • AnkhSVN
    Lets you work with the SVN source control server by integration with Visual Studio.
  • Consolas Font Pack
    This is a wonderful font that is very easy to read. It is highly recommended for Visual Studio. I use it as my default.
  • SmartFTP
    A great FTP program.
  • Paint.NET
    This is one of my favorite projects currently on the internet. The developer of this application is constantly pushing C# to the limits. And does a great job with usability. It also has 99.9% of everything I require from a graphic editor as a software developer. The 0.1% that is missing is Icon support.
  • Microsoft Virtual PC
    This is a must have for any developer, especially when you are required to run operating systems that are not your current install.

Firefox Add-On

  • LinkedIn Companion for Firefox
    LinkedIn integration for keeping track of contacts.
  • StumbleUpon
    Great add-on that allows you to find sites you never knew you wanted to find.
  • IE Tab
    This is probably one of my favorites because it quickly lets me switch back and forth between Firefox and IE without ever leaving the Firefox browser.
  • User Agent Switcher
    Allows you to change the User Agent of FireFox with a quick drop down menu. I usually setup a User-Agent for Google Bot to see how websites react and change to the search engine.
  • Google Browser Sync
    Keeps your bookmarks in FireFox synced between your work and home PC.
  • Firebug
    Firebug is a must have for any professional web developer. It allows deep access to the HTML in a nice tree structure and event displays code that is generated by DHTML and JavaScript.

    • YSlow
      Grades your website and provides some useful hints on improving your score.

Other Software That Makes My Life Easy

  • Mozy *** My Review ***
    Everybody should back up their computer, and Mozy provides unlimited backup for $4.95 per month. Also Mozy Pro allows you to backup your SQL Server and Exchange installs.
  • Skype
    Great for making VOIP calls to your friends and family. Also many contractors are starting to use this as their primary communication especially over seas.
  • Picassa
    Very good program for keeping track of your family photos.
  • Gtalk
    I love it because it has a very small foot print.
  • Google Pack
    Get a whole host of software provided by Google and it also updates other common programs for you, such as Skype, FireFox, Acrobat, and others.
  • 7-Zip
    I mainly use this on my Servers because it provides better and quicker support for archiving of Zip files than the built in Windows Zip Archiver.
  • PowerArchiver
    I became disenchanted with WinZip about 4 years ago, and I happened to stumble across this application that had the look and feel of WinZip but provided support for 7-Zip, RAR, CAB, ZIP, GZip, and many others.
  • Virtual TI-89
    Because every once and a while you need to graph out more complex equations.
  • CCleaner
    It’s a very good idea to clean your registry every Spring. It is really amazing the speed in boot time when Windows doesn’t have to load a bloated Registry.
  • Ultimate Boot CD
    Wonderful set of tools.
  • WordPress
    I use it on Coder Journal, and even though my forte is .NET I still haven’t found a better blogging application.
  • Windows Live Writer
    Allows for quick and easy posts.
  • Deamon Tools
    Quickly mount and dismount ISO images for your favorite software.
  • LinkedIn Outlook Toolbar
    Allows you to keep your Outlook Contacts in sync with your LinkedIn network information and connections
  • gSyncIt
    Allows me to keep my Google Calendar in sync with Microsoft Outlook, so that my wife always knows what is going on during the day. Also has the added benifit of syncing stuff from Google to Outlook when she wants to add something to my calendar.

Tags: , , , , , , ,

Posted in ASP.NET, C#, Personal, Programming, Review, SQL | kick it on DotNetKicks.com | Bookmark | View blog reactions | 1 Comment »

February 11th, 2008

How To: Change Instance Name Of SQL Server

Recently I change the network name of one of my servers at work, because the box changed its job from a virtual machine server to the database server. Everything was going great until I decided to setup the server for replication and received the following error message.

New Publication Wizard
——————————

SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternate name are not supported. Specify the actual server name, ‘old_name’. (Replication.Utilities)

——————————
OK
——————————

So with a little hunting and SQL queries I found out that SQL Server doesn’t use the network name, it only excepts that as an alias. My SQL Server instance was still named “old_name”. I found that out by running these two queries:

sp_helpserver
select @@servername

So in order to get the network name and the SQL Server instance name back in sync I had do these steps:

  1. Run this in Microsoft SQL Server Management Studio:
    sp_dropserver 'old_name'
    go
    sp_addserver 'new_name','local'
    go
  2. Restart SQL Server service. I prefer the command prompt for this, but you can just as easily do it in Services under the Control Panel
    net stop mssqlserver
    net start mssqlserver

Then after that is done run this again, to make sure everything is changed:

sp_helpserver
select @@servername

I don’t understand why SQL Server uses it’s own name versus the network name, might be due to the fact you can have multiple SQL Server instances install on one machine. It wasn’t too hard to change and probably stems from the days when SQL Server was known as Sybase, all in all, I learned something new and it only took 30 minutes of my day to fine the answer.

Tags: , , , , ,

Posted in How To, SQL | kick it on DotNetKicks.com | Bookmark | View blog reactions | 2 Comments »

February 3rd, 2008

Does anybody have a name for this programming pattern?

Recently I have been working very hard on getting a new Web 2.0 initiative off the ground. With most new initiatives I like to start out by looking for software development patterns that will help me standardize my structure as well as make the programming experience common for any new members that are brought on the team. However I recently ran in to a structural “pattern” that seems like it is pretty simple and it addresses a common problem in software development. I researched as much as possible on all the common pattern websites that I visit and even went as far as posting on ASP.NET Forums to see if anybody could help me, give it a name. If this “pattern” hasn’t been named yet I am going to be shocked.

I like to consider myself pretty educated when it comes to some of the recent developments in structured software development. However I am at a total loss here so I am presenting this pattern to my readers to see if they have seen it before? For now I am calling this “The Modeling Pattern”:

The pattern I had in mind is to have the same object with different interfaces each modeling the required data for a specific type of User Interface.

In many websites you normally have the same information represented in various different ways. I originally arrived at this pattern after listening to Scott Hanselman’s MVC Screencast. The idea of a model, as in the M in the Model View Controller (MVC), really intrigued me. The more I thought about standard web page designs and how they are mostly based around only one “object”, the more it convinced me I was using the right model. For example you have these two different views of a article on the .NET Kicks site. (Which is a great site by the way.)

.NET Kicks Article Card

I call this a card just for the fact that it is a small representation of all the information for this article, much like a business card is a small representation of all the information about a person.
.NET Kicks Article Card

.NET Kicks Article

.NET Kicks Article

Notice how most of the information is similar between the two images above. We know they are similar because it is the same information represented from the database in different views. However the main difference is the amount of information show. Obviously it would be a massive overkill to load the users who kicked the story, and comments, when all that is required is the card view for the front page. I imagine most of this is not new to many of my readers, because SQL lets you create your datasets (models) however you want at will, the real trick in software development is creating the finite number of objects for the infinite number of datasets that SQL can return. That is what I am trying to address with “The Modeling Pattern”, creating a finite number of objects that makes sense based on the views I need for my application, because you obviously don’t want to dirty load all the properties for performance reasons. This is how I would code the above in “The Modeling Pattern”.

interface IUserModel
{
	int Id { get; set; }
	string UserName { get; set; }
	DateTime JoinedOn { get; set; }
}

interface IArticleCardModel
{
	int Id { get; set; }
	string Name { get; set; }
	string Description { get; set; }
	int KickCount ( get; set; }
	int CommentCount ( get; set; }
	void Kick (IUserModel user);
}

interface IArticleModel : IArticleCard
{
	List<string> Comments { get; }
	List<IUserModel> UserKicks { get; }
}

Then with these interfaces you create the objects.

class User : IUserModel
{
	// implement interfaces plus supporting code
}

class Article : IArticleModel, IArticleCardModel
{
	// implement interfaces plus supporting code
}

Then you create a helper class to fill these methods in the data layer.

static class DataHelper
{
	public static IArticleCardModel GetArticle (int id)
	{
		IArticleCardModel a = new Article();
		// get data from database and only fill in IArticleCardModel interfaces
	}

	public static IArticleModel GetArticle (int id)
	{
		IArticleModel a = new Article();
		// get data from database and fill in IArticleModel interfaces
		// including supporting tables such as the collections
		// or fill in some and dirty fill the others
	}

	// do the same for User
}

To use this pattern in something like the MVC framework, you would just use the interfaces instead of the actual object. What this does for you is two fold. Defines the UI model that is required and because it is an interface it doesn’t allow you access to the other properties of the class that maybe null.

So if anybody has seen this pattern before I would love to here about it. Also if you have a better name for it and you haven’t heard of it, I would love it to have something more than the tactical “The Modeling Pattern”.

Tags: , , , , , ,

Posted in ASP.NET, C#, Programming, SQL | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »