Thursday, February 28, 2008

USB Drive Security

I carry my 1GB USB Thumb Drive with me everywhere I go and I store some stuff on there that I wouldn't want anyone to get a hold of (Quicken backup & KeePass mainly). So this was the perfect opportunity to try out TrueCrypt 5.0a.

First, I did a full device encryption. I quickly found out that this wouldn't work for me, since in order to mount the device TrueCrypt has to be installed on the computer. I reformatted and then went the "Traveler" route. I used the version of TrueCrypt installed on my desktop to create a standard volume on my USB Drive. I went with a size of 950 MB, leaving roughly 32 MB for the "Traveler" install. After the volume was done, I went to Tools -> Traveler Disk Setup (on TrueCrypt's menu). I picked the root of my USB Drive as the create location and unchecked "Include Volume Creation..." since I had already created the volume. I also setup AutoRun to mount the volume I just created. Now, all I have to do is plug the Thumb Drive in, enter the password, and it's ready to go. And I don't have to worry about someone getting my sensitive data since they won't know my "secure" password to mount the drive.

NOTE: The "Traveler" install took up less than 1.5 MB on my thumb drive

Friday, February 22, 2008

Service Project Update

I finally finished up my project to solve the Dynamic IP issue. I was having a hard time sending out an email (Charter must block outgoing SMTP requests to any server other than their own). But thanks to this post about the C# .NET GMail Tools, I was able to use the DLL and in a matter of minutes send an email. If anyone wants to see the code (it's pretty basic) just send me an email or post a comment.

Wednesday, February 20, 2008


This site has some great comics. Like this one:

Windows Live Writer

I'm writing some posts using Windows Live Writer. I didn't know this app existed until I read a post by Joel Varty (from his blog). It seems to be a decent blog editor. Keep in mind that I don't use much to post, just text and the occasional picture. The main features that I like are:

  • Integration with a few major blog services (including Blogger)
  • Spell checking
  • Write posts offline


I finally gave in and joined twitter. Follow me here.

Monday, February 18, 2008

RDP and Dynamic IP

This past weekend I was back at my house (I have an apt where I work and that's where my main computer is) and wanted to work on my phone number project. Of course I can't seem to remember what my external IP is, so I can't connect to my desktop. In order to prevent this from happening again, I decided that I'm going to write a windows service that will run all of the time. Every so often (half hour or maybe hour) it can check what my external IP is and if it has changed since the last time it checked, send me an email (which I can get to anywhere). I'm going to have to use Visual Studio 2005, since VS2008 Express Editions don't like you create a windows service (among a lot of other things). I'll post some code when I get something that works alright.

Monday, February 11, 2008

"Ctrl + ." & Express Edition Issue

Another cool feature in VS2008 (and maybe previous versions) is the "Ctrl + ." shortcut. If you know you want to use a specific class, but can't remember what namespace it is in; just type in the class name and hit "Ctrl + .". You will see some "intellisense" that will allow you to either enter the namespace before the current text or add a using statement at the top of the file.

Another note, if you are using VS 2008 to do any web development, make sure to install the new performance fixes found here.

Now for the issue, I wanted to create a database project to hold onto all my database scripts for my "personal project". I looked everywhere in VS 2008 C# Express Edition and the Web Developer Express Edition. Couldn't find it. I did some research and found out that the express editions do not have an option to create a Database Project or a Web Application Project. So I'll have to manage the scripts by myself :@

Friday, February 8, 2008


Today, I used the Shelve/unshelve features in TFS 2008 for the first time. I had made some major changes to our project and wasn't ready to check them in, but a bug came up in the class that needed to be fixed right away. So I "shelved" my current changes and unchecked the "preserve changes" option. I then had the same version as TFS. Fixed the bug, checked it in, and after that "unshelved" my changes. I was back and ready to test my original changes. Much, much easier than making a zipped copy of the project directory and having to extract those files back after checking in the other fix.

Thursday, February 7, 2008

Personal Project

I decided to start a small programming project at home. While I was trying to figure out what I should do, I thought that I should do something that I would actually use. I came up with an address book. I always rely on my cell phone for people's phone numbers, but what would happen if I lost my phone? I'd have to send emails to everyone saying I need their numbers or post something on facebook. If I created a web application that would allow me to easily enter numbers and addresses into a database, then losing my phone wouldn't be such a big deal.

Then, I had to decide the language, UI, and DBMS. I chose a language that I have done quite a bit of programming in, C#. This is just something I'm going to use at home, so I don't have to worry about licensing and since I have experience with it, I'll go with SQL Server 2005 for the DBMS. I wanted to try out something new for the UI, Silverlight. Hopefully, this will go smoother than my attempt to learn Flash a couple of years ago :S

Here are the links I've used so far:

Next is the design stage...

Keyboard Shortcut (organize usings)

As I mentioned in the post yesterday, having a way to remove unnecessary "using" statements and to sort them quickly is a great feature in Visual Studio 2008. But as a developer having to move your hand to the mouse wastes precious time, why not setup a keyboard shortcut?

It is simple to setup this shortcut, just open up VS and go to Tools -> Options. Expand the "Environment" tree and select "Keyboard" (see image below). The command name for reorganizing and removing the using statements is "Edit.RemoveAndSort". Start typing that in the "Show commands containing:" text box and select it when you see it in the list. Now click in the "Press shortcut keys" text box and press your shortcut combination. If this combination is already used for something else it will say that in the "Shortcut currently used by" text field. When you enter the shortcut you want to keep, click OK.

Wednesday, February 6, 2008

VS2008 - Organize usings

I read about a sweet feature built into Visual Studio 2008 this morning. It allows you to alphabetize the using statements at the beginning of your C# class. It can also remove using statements that are not necessary. All you have to do is right-click anywhere in your class, go to "Organize usings" and then click what you would like to do (Remove, Sort, or Remove and Sort). I'll post screenshots tomorrow and also post how to setup a keyboard shortcut to remove and sort.

EDIT: Here's the screenshot for organizing the usings.