Archive for February, 2007

February 28th, 2007

Microsoft SQL Server 2005 SP2 for Vista

Microsoft with out much fan far released service pack 2 for SQL Server 2005. There is a whole laundry list of new features and bug fixes listed on MSDN. However one of the biggest features at least for early adopters is the support for Windows Vista both x86 and x64 versions of the operating system. This release brings with it a great new tools for Windows Vista that are not available for previous operating systems.

Download SQL Server 2005 Service Pack 2

In order to prove Microsoft is really serious about security and that UAC (User Account Control) is here to stay. They don’t automatically grant all Administrators of the machine access to SysAdmin privileges in SQL 2005. The SysAdmin privileges have to be granted on the basis of who needs them, which is common practice in any role based security. The new tool can be found at C:\Program Files (x86)\Microsoft SQL Server\90\Shared\SqlProv.exe and is pictured below. I personally welcome this added level of security and control I have over who has SysAdmin access to SQL Server. Not that I worry about my wife going in and screwing with my data, it is just nice to have control over your computer. Thank you Microsoft for you continued focus on security.

SQL Server 2005 Vista User Provisioning

Tags: , , ,

Posted in Programming, SQL | kick it on DotNetKicks.com | Bookmark | View blog reactions | 1 Comment »

February 28th, 2007

Why Does Vista Use All My Memory?

This question comes up a lot when my friends and co-workers are arguing over the merits of Windows Vista. They say, “My {insert some Linux distro here} only uses {insert another useless amount of RAM here} RAM, why is Vista such a hog?” I usually go on to explain to them about SuperFetch and ReadyBoost, and all the advances and better memory management that went in to these two technologies. All information that is freely available from Part 1 and Part 2 of the Inside the Windows Vista Kernel articles.

However, I believe, Jeff Atwood from Coding Horror does a much better job.

Tags: , ,

Posted in Programming | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

February 28th, 2007

Sound Bytes Podcast is back!

Well it has been a little over a three month since their original Podcast server bit the dust. But I am happy to welcome back the Sound Bytes Podcast, and now I have two months of shows to catch up on. Thanks guys!

For anybody not familure with the Sound Byte Guys here is a quick biography of the program.

Since 1989, Sound Bytes has been a call-in radio show on public radio. That airs every Sunday from 11 AM to 1 PM, on 1180 WHAM out of Rochester, NY bringing you news, views, and stuff you can use, as the guys talk about hardware, software, nifty toys, industry trends, silly stuff, and just about anything that flits through our brains.

You can listen to their show every week via streaming audio out of Rochester, NY or visiting their website.

Tags:

Posted in Programming, Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

February 25th, 2007

Cell Phone USB Modem Driver for Windows Vista

When Windows Vista first came out nearly 3 months ago, I had a difficult time getting my XV-6700 PDA Phone from Verizon to connect to my laptop as a CDMA Modem. After much searching and reading of Microsoft KB articles I realized this driver had been floating around the Smartphone world since 2002. However Microsoft had changed the way they wanted winmodem drivers written around the time of Windows XP SP1, however Windows XP was still backwards compatible. However when Windows Vista was released they made the new driver format the rule, and thus the reason the 7 year old driver will not work.

So after I understood the problem I set out to change the driver based on this KB837637 article from Microsoft. And the follow picture shows how easy in the changes were to make the driver fully Windows Vista complaint.
Winmodem Smartphone Driver Diff

So after the work I have done, which you can imagine it was mostly reading and understanding of the problem, I am giving this driver way free to my readers and anybody else who would like it. I provide no warranty or support for the above driver.
Download Smartphone USB Modem Driver

If you need help getting this driver to work with your Cell Phone, please check out the great articles from Engadget. They are Verizon and Sprint (CDMA) specific but should easily translate to Cingular and other GSM providers.

Update: This driver was originally made by HTC, however there should be nothing preventing your from using it with other PDA devices that use the Pocket PC winmodem program.

Tags: , ,

Posted in How To, Programming, Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | 3 Comments »

February 22nd, 2007

The Evolution of a Programmer

I just found this today out on the net, it seems to have many forms so the author is Anonymous.

High School/Jr.High

  10 PRINT "HELLO WORLD"
  20 END

First year in College

  program Hello(input, output)
    begin
      writeln('Hello World')
    end.

Senior year in College

  (defun hello
    (print
      (cons 'Hello (list 'World))))

Read the rest of this entry »

Posted in Programming | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

February 21st, 2007

Understand C#: Proper use IDisposable and using keyword

The System.IDisposable interface is a very useful interface to understand if you are concerned about performance in your application. Microsoft says the following about the IDisposable interface:

The garbage collector automatically releases the memory allocated to a managed object when that object is no longer used, however, it is not possible to predict when garbage collection will occur. Furthermore, the garbage collector has no knowledge of unmanaged resources such as window handles, or open files and streams.

Most System.Data, System.IO and System.Windows.Controls objects use the IDisposable interface, as well as many others, to free up unmanaged resources that may have been created when the object was initialized. Unmanaged resources are any calls that are made outside of the .NET environment, this can be GDI+ calls, SQL Driver calls, Disk IO calls, or basically anything that cannot be accounted for by the Garbage Collector.

Often times you will see database connection code that looks like this:

SqlConnection conn = new SqlConnection("{connection string}");
SqlCommand command = new SqlCommand(conn);

command.CommandText = "select * from SomeTable";

// ... some more code to use the command

conn.Close();

However there are a problem with this code, the unmanaged resources for the SQL connection have not yet been destroyed in memory. The correct way this code should have been written is the following:

using (SqlConnection conn = new SqlConnection("{connection string}")) {
	using (SqlCommand command = conn.CreateCommands()) {

	command.CommandText = "select * from SomeTable";

	// ... some more code to use the command

	conn.Close();
	}
}

And if you were to look at this code under a microscope the following code is actually what is happening:

SqlConnection conn;
SqlCommand command

try {
	conn = new SqlConnection("{connection string}");
	command = new SqlCommand(conn);

	command.CommandText = "select * from SomeTable";

	// ... some more code to use the command
} finally {
	conn.Close();
	command.Dispose();
	conn.Dispose();
}

So essentially even if an exception is thrown from your code, the unmanaged code is still cleaned up and you don’t have memory leaks from unmanaged code sitting around in memory waiting to be reclaimed. It is reclaimed instantly after you are done working with it.

If you would like to learn more about the code used above please see these links

Tags: ,

Posted in C#, Programming | kick it on DotNetKicks.com | Bookmark | View blog reactions | 4 Comments »

February 20th, 2007

Remove Updater5 from My Documents Folder

Well I finally figured out how to remove the Updater5 folder from your My Documents folder. I have written about this problem, as well as many other people, and now here is the solution for us anal retentive people that don’t like our My Documents folder cluttered with application artifacts.

Follow the couple steps I have outlined below and the Updater5 folder will be out of your life forever.

  1. Go to C:\Program Files\Common Files\Adobe\Updater5
  2. Run AdobeUpdaterInstallMgr.exe and wait for the progress bar to finish and show you the following screen.
    Adobe Updater Window
  3. Then click Browse button and change it to any directory you want as shown below.
    Adobe Updater Preferences Window
  4. Now click the OK button and you are done.

And now you should never see the Updater5 folder in your My Documents folder ever again. This solution has worked both on my Windows XP as well as Windows Vista boxes that I have tried it on. For Mac users you can try hunting down the same updater program and going through the steps however I don’t have a step-by-step guide for you.

This solution seems a little more elegant than many of the other solutions I have seen floating around on the net. So pass this around and thank the stars that Adobe made this configurable, even thought it is hidden away and should have never been defaulted to the My Documents folder in the first place.

Update: Many people have been asking me if they can offer me anything for getting rid of the annoying Updater5 folder. Honestly the answer is no, I do this because I enjoy doing it, and I hope the readers will come back to check out my other content. But if you would really like to do something for me, please visit one of the sponsors to the right or the left. They are how I support this site and keep it running.

Tags: , ,

Posted in Programming, Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | 9 Comments »

February 20th, 2007

Virtual PC 2007 available for free download

Microsoft has made the full version of Virtual PC 2007 available for download from their web site.

The program is supported on the following servers:

  • Windows Server 2003, Standard Edition (32-bit x86);
  • Windows Server 2003, Standard x64 Edition;
  • Windows Vista Business;
  • Windows Vista Business 64-bit edition;
  • Windows Vista Enterprise;
  • Windows Vista Enterprise 64-bit edition;
  • Windows Vista Ultimate;
  • Windows Vista Ultimate 64-bit edition;
  • Windows XP Professional Edition ;
  • Windows XP Professional x64 Edition ;
  • Windows XP Tablet PC Edition

That leaves out the Home and Media Center editions of Windows Vista and Windows XP, as well as the Web and Enterprise versions of Windows Server 2003.

It offers the following improvements over previous versions:Virtual PC 2007

  • Support for Windows Vista as a host
  • Support for Windows Vista as a guest
  • Support for Windows Vista 64-bit as a host
  • Improved performance compared to Virtual PC 2004
  • Hardware-assisted Virtualization (as seen in the picture to the right)

I have been running Virtual PC 2007 since it was released as a released canidate, and I can say I am very happy with the progress Microsoft has made with the product. One thing to not before trying the Hardware-assisted Virtualization is to make sure your computer supports it by checking your processor and getting the latest BIOS update.

Tags: , ,

Posted in Programming | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

February 20th, 2007

Penn State Students raise $5.2 MILLION for Kids with Cancer.

This really doesn’t have to do with computers. But while I was attending Penn State I was able to participate in THON. Each year they raise more money for children with cancer than the year before. After 46 hours of a no-sleeping, no-sitting whirlwind of a weekend at the Penn State Interfraternity Council/Panhellenic Dance Marathon (THON) overalls announced the practically incomprehensible total to be donated to the Four Diamonds Fund, an unprecedented record-breaking philanthropic total of money raised — $5,240,385.17

read more | digg story

Posted in Personal | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

February 15th, 2007

Rant: Passwords and public sites.

I have recently run in to a couple websites which have a very annoying “feature”. Basically they have taken an internal policy applying to passwords and forced it externally on their loyal customers. This “feature” is to remember every password you have every previously had and not allow you to use it again. I don’t know what ‘Genius’ inside these linked companies thought this might be a good idea because this is how they run things with in the corporate walls, but out in the real world all that they are doing is forcing loyal customers to pull out their hair.

You may say “So what? That is a good way to protect the data, my company does the same thing.” Well corporate security has a good reason to force that on their employees, because they are protecting the intellectual property of the organization. Plus if that doesn’t work for you, they are paying you. I don’t know of anybody who says thank god for Company X they make me change my password every X months or every time I forget it. So what you end up with is a password that you have to write down or make so simple your 8 year old could guess it because it is not one of your standard passwords or phrases that you have developed and homed over the years.

Now combine that with the mandatory reset policy, that these companies have, if you happen to mistype the password 3 times while trying to guess which of your passwords it is. Oh and of course your password cannot be the same as any of your previous passwords, so you have to make it up on the fly, and after going through this process a couple dozen times you have used all your passwords that are common. So you get in to this repeating process of having to do a password reset each and every time you visit the website.

I really don’t understand most of the time what they are trying to protect. I can understand GoDaddy doing this, because it would be easy to transfer out valuable domains that people own, but what kind of data are people going to steal from Verizon Wireless, my credit card account is not shown, and I don’t really care if somebody sees how often I call my parents or wife.

I call on these companies and any company who uses this practice for external customers to remove this ‘feature’, while the intentions may have been noble the execution in the real world falls flat on its face. If anything this should be an option for customers, but then again I don’t personally know of anybody who would volunteer for this “feature”. If you really want to secure your customers against identity theft start implementing alternate authentication options such as OpenID or CardSpace.

Tags:

Posted in Programming, Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »