|
 Saturday, October 27, 2007

VS2008 VPC's Are Expiring Prematurely on Nov 1st

expiredReading Jeff Beehler's blog posted a thread here stating that the VS2008 VPC's are going to  terminate prematurely because of an OS expiration date of Nov 1st 2007.

If you're using any of the VS2008 VPC's you'll want to read this. You're going to have to back up your TFS database, and then restore it into a new VPC that is being created as we speak and is expected to be live early next week.

Read More Here

#    Comments [0] |
 Tuesday, October 23, 2007

Content Type Class File

I always get tired of looking up content types so I created a static class file for it.

Use this class anytime you need to access content types in your code (like sending a user an attachment via a web interface).

Download the file at the bottom of this post.

using System;

namespace Example.ContenTypes
{
    public static class ContentType
    {
        public const string evy = "application/envoy";
        public const string fif = "application/fractals";
        public const string spl = "application/futuresplash";
        public const string hta = "application/hta";
        public const string acx = "application/internet-property-stream";
        public const string hqx = "application/mac-binhex40";
        public const string doc = "application/msword";
        public const string dot = "application/msword";
        public const string unknown = "application/octet-stream";
        public const string bin = "application/octet-stream";
        public const string Class = "application/octet-stream";
        public const string dms = "application/octet-stream";
        public const string exe = "application/octet-stream";
        public const string lha = "application/octet-stream";
        public const string lzh = "application/octet-stream";
        public const string oda = "application/oda";
        public const string axs = "application/olescript";
        public const string pdf = "application/pdf";
        public const string prf = "application/pics-rules";
        public const string p10 = "application/pkcs10";
        public const string crl = "application/pkix-crl";
        public const string ai = "application/postscript";
        public const string eps = "application/postscript";
        public const string ps = "application/postscript";
        public const string rtf = "application/rtf";
        public const string setpay = "application/set-payment-initiation";
        public const string setreg = "application/set-registration-initiation";
        public const string xla = "application/vnd.ms-excel";
        public const string xlc = "application/vnd.ms-excel";
        public const string xlm = "application/vnd.ms-excel";
        public const string xls = "application/vnd.ms-excel";
        public const string xlt = "application/vnd.ms-excel";
        public const string xlw = "application/vnd.ms-excel";
        public const string msg = "application/vnd.ms-outlook";
        public const string sst = "application/vnd.ms-pkicertstore";
        public const string cat = "application/vnd.ms-pkiseccat";
        public const string stl = "application/vnd.ms-pkistl";
        public const string pot = "application/vnd.ms-powerpoint";
        public const string pps = "application/vnd.ms-powerpoint";
        public const string ppt = "application/vnd.ms-powerpoint";
        public const string mpp = "application/vnd.ms-project";
        public const string wcm = "application/vnd.ms-works";
        public const string wdb = "application/vnd.ms-works";
        public const string wks = "application/vnd.ms-works";
        public const string wps = "application/vnd.ms-works";
        public const string hlp = "application/winhlp";
        public const string bcpio = "application/x-bcpio";
        public const string cdf = "application/x-cdf";
        public const string z = "application/x-compress";
        public const string tgz = "application/x-compressed";
        public const string cpio = "application/x-cpio";
        public const string csh = "application/x-csh";
        public const string dcr = "application/x-director";
        public const string dir = "application/x-director";
        public const string dxr = "application/x-director";
        public const string dvi = "application/x-dvi";
        public const string gtar = "application/x-gtar";
        public const string gz = "application/x-gzip";
        public const string hdf = "application/x-hdf";
        public const string ins = "application/x-internet-signup";
        public const string isp = "application/x-internet-signup";
        public const string iii = "application/x-iphone";
        public const string js = "application/x-javascript";
        public const string latex = "application/x-latex";
        public const string mdb = "application/x-msaccess";
        public const string crd = "application/x-mscardfile";
        public const string clp = "application/x-msclip";
        public const string dll = "application/x-msdownload";
        public const string m13 = "application/x-msmediaview";
        public const string m14 = "application/x-msmediaview";
        public const string mvb = "application/x-msmediaview";
        public const string wmf = "application/x-msmetafile";
        public const string mny = "application/x-msmoney";
        public const string pub = "application/x-mspublisher";
        public const string scd = "application/x-msschedule";
        public const string trm = "application/x-msterminal";
        public const string wri = "application/x-mswrite";
        public const string nc = "application/x-netcdf";
        public const string pma = "application/x-perfmon";
        public const string pmc = "application/x-perfmon";
        public const string pml = "application/x-perfmon";
        public const string pmr = "application/x-perfmon";
        public const string pmw = "application/x-perfmon";
        public const string p12 = "application/x-pkcs12";
        public const string pfx = "application/x-pkcs12";
        public const string p7b = "application/x-pkcs7-certificates";
        public const string spc = "application/x-pkcs7-certificates";
        public const string p7r = "application/x-pkcs7-certreqresp";
        public const string p7c = "application/x-pkcs7-mime";
        public const string p7m = "application/x-pkcs7-mime";
        public const string p7s = "application/x-pkcs7-signature";
        public const string sh = "application/x-sh";
        public const string shar = "application/x-shar";
        public const string swf = "application/x-shockwave-flash";
        public const string sit = "application/x-stuffit";
        public const string sv4cpio = "application/x-sv4cpio";
        public const string sv4crc = "application/x-sv4crc";
        public const string tar = "application/x-tar";
        public const string tcl = "application/x-tcl";
        public const string tex = "application/x-tex";
        public const string texi = "application/x-texinfo";
        public const string texinfo = "application/x-texinfo";
        public const string roff = "application/x-troff";
        public const string t = "application/x-troff";
        public const string tr = "application/x-troff";
        public const string man = "application/x-troff-man";
        public const string me = "application/x-troff-me";
        public const string ms = "application/x-troff-ms";
        public const string ustar = "application/x-ustar";
        public const string src = "application/x-wais-source";
        public const string cer = "application/x-x509-ca-cert";
        public const string crt = "application/x-x509-ca-cert";
        public const string der = "application/x-x509-ca-cert";
        public const string pko = "application/ynd.ms-pkipko";
        public const string zip = "application/zip";
        public const string au = "audio/basic";
        public const string snd = "audio/basic";
        public const string mid = "audio/mid";
        public const string rmi = "audio/mid";
        public const string mp3 = "audio/mpeg";
        public const string aif = "audio/x-aiff";
        public const string aifc = "audio/x-aiff";
        public const string aiff = "audio/x-aiff";
        public const string m3u = "audio/x-mpegurl";
        public const string ra = "audio/x-pn-realaudio";
        public const string ram = "audio/x-pn-realaudio";
        public const string wav = "audio/x-wav";
        public const string bmp = "image/bmp";
        public const string cod = "image/cis-cod";
        public const string gif = "image/gif";
        public const string ief = "image/ief";
        public const string jpe = "image/jpeg";
        public const string jpeg = "image/jpeg";
        public const string jpg = "image/jpeg";
        public const string jfif = "image/pipeg";
        public const string svg = "image/svg+xml";
        public const string tif = "image/tiff";
        public const string tiff = "image/tiff";
        public const string ras = "image/x-cmu-raster";
        public const string cmx = "image/x-cmx";
        public const string ico = "image/x-icon";
        public const string pnm = "image/x-portable-anymap";
        public const string pbm = "image/x-portable-bitmap";
        public const string pgm = "image/x-portable-graymap";
        public const string ppm = "image/x-portable-pixmap";
        public const string rgb = "image/x-rgb";
        public const string xbm = "image/x-xbitmap";
        public const string xpm = "image/x-xpixmap";
        public const string xwd = "image/x-xwindowdump";
        public const string mht = "message/rfc822";
        public const string mhtml = "message/rfc822";
        public const string nws = "message/rfc822";
        public const string css = "text/css";
        public const string h323 = "text/h323";
        public const string htm = "text/html";
        public const string html = "text/html";
        public const string stm = "text/html";
        public const string uls = "text/iuls";
        public const string bas = "text/plain";
        public const string c = "text/plain";
        public const string h = "text/plain";
        public const string txt = "text/plain";
        public const string rtx = "text/richtext";
        public const string sct = "text/scriptlet";
        public const string tsv = "text/tab-separated-values";
        public const string htt = "text/webviewhtml";
        public const string htc = "text/x-component";
        public const string etx = "text/x-setext";
        public const string vcf = "text/x-vcard";
        public const string mp2 = "video/mpeg";
        public const string mpa = "video/mpeg";
        public const string mpe = "video/mpeg";
        public const string mpeg = "video/mpeg";
        public const string mpg = "video/mpeg";
        public const string mpv2 = "video/mpeg";
        public const string mov = "video/quicktime";
        public const string qt = "video/quicktime";
        public const string lsf = "video/x-la-asf";
        public const string lsx = "video/x-la-asf";
        public const string asf = "video/x-ms-asf";
        public const string asr = "video/x-ms-asf";
        public const string asx = "video/x-ms-asf";
        public const string avi = "video/x-msvideo";
        public const string movie = "video/x-sgi-movie";
        public const string flr = "x-world/x-vrml";
        public const string vrml = "x-world/x-vrml";
        public const string wrl = "x-world/x-vrml";
        public const string wrz = "x-world/x-vrml";
        public const string xaf = "x-world/x-vrml";
        public const string xof = "x-world/x-vrml";

    }
}

 

Download File

ContentType.zip (1.62 KB)
#    Comments [2] |
 Wednesday, October 17, 2007

A Geek's Checkbook Register

balancing Ok, that's it... time for a confession... I hate balancing my checkbook. I mean, I REALLY HATE it. I avoid it like the plague. Ever since I've started making decent money in software development I've only balanced my checkbook on a semi-regular basis. Maybe twice a month. Unfortunately this doesn't cut it these days when you're trying to plan out huge vacations and income and, whatever, you get the point. I need to balance my checkbook. Plain and simple.

I used to be a checkbook-balancing-fiend. I'd make a purchase, I'd mark the receipt, I'd store the receipt, I'd get home, I'd log it into the register, recalculate available balance, blah blah blah. BORING.

 

THE PROBLEM 

Ya see, my problem with balancing a checkbook is that its too time consuming. It's not a process that I've really automated just yet. As a software developer I'm enamored with figuring out ways to automate all repetitive processes. I get bored quickly, and honestly, I believe, that like myself - programmers are lazy.

So that's my problem. I'm lazy, I don't want to write another line in my checkbook register, I don't need to, blah blah blah. But I do. I need to keep my records straight.

 

POSSIBLE SOLUTIONS

The Good Ol' Paper Register: Nahhhhh-son, we've already covered this. I can't stand it. Nope. Ain't gonna happen.

Current Finance Applications: I've went down the Quicken/MS Money/QuickBooks bricked paved road before and honestly, its too complicated. I still have to save my receipts, enter them into a register, and then reconcile it with my bank account once the transactions clear the bank account. Its a royal pain in the ass if you ask me.

 

THE NEED/THE WANT/THE REQUIREMENT

I want something simple.  That's all, nothing more, nothing less. I want something simple, yet easy.

And I found it...

 

THE SOLUTION

clearcheckbook While surfing the web, looking for personal finance applications I ran across Clear Check Book.

 

What is it? Clear Check Book is a FREE check book balancing system that allows you to manage your financial accounts. Right now I'm using it to manage my checkbook but in the future I'll put other accounts in there. You can manage Checking, Savings, Credit, 401k, you name it, you can manage it.

How Does It Work? Transactions are added through a web interface or a mechanism called "checkbot" (which I'll cover in detail in a few seconds). Your balance is automatically calculated. You can specify which category the withdrawl/deposit is for and also review some basic reports on your data.

Therefore you can see that last month you spent $671.31 on restaurants alone (time to cut back on the Margaritas hombre!). You get the point.

Reconciling AKA Jiving - Clear Check Book has something known as "Jiving" your statement. What this means is that you'll match your transactions with your cleared bank transactions. Since you can access your bank online you can do this as soon as you'd like or just batch your tasks to save time like I do. So, once you have found the $5.76 purchase from Starbucks on yoru bank, and you you've already entered it into Clear Check Book, you can now know that the transaction "jives" with what you see at your bank. Therefore, if you have something in Clear Check Book, that is no "Jived" you will know it has not cleared your bank. You know something is Jived once you see a green check mark next to it. See this screen shot for an example.

CheckBot - This, right here, is what sold me on this service. Without CheckBot, this service would be another fart in the wind. CheckBot is a tool that you can use to balance your checkbook through the use of SMS/Text Messages or Instant Messages.  By sending a simple text message you can log an entry in your checkbook register.

For example...

Tonight I went to Target and I had to get a few things. I sent a message to CheckBot that looks like this:

clearcheckbook: w 10.49 ck m Target

Now, when I log into my ClearCheckBook.com account, I will have a withdrawl (w) for the amount of 10.40, in my checking account (ck), in the Misc Items (m) category from Target.

I can also make deposits, transfer money, request your current balance, get help and more...

 

THE SIMPLICITY

The Key here is that I can now make a purchase, send a text message, and my checkbook is ALWAYS balanced. Once a week I log in, and "jive" my accounts with my actual bank statement. I've been doing this for a few weeks now and I ABSOLUTELY LOVE IT. My accounts have been DEAD on, penny for penny, day in, day out.

I've also taught my wife how to use this service. Now we both make purchases out of our joint account, and she updates the account and I update the account.

This right here, is what makes it worthwhile for me. Its SUPER SIMPLE. We're programmers, so lets check out the basic workflow.

- Go to store > Buy some stuff > Send Text Message To Checkbot with withdrawl > Check book is balanced

 

SECURITY

This is a big concern for a lot of people. But here's the deal. I've spoken to the team at Clear Check Book just because I knew people would be concerned when I wrote this post.

1. Your account only accepts messages from approved phone numbers/AIM/ICQ.

But what about SMS Spoofing? All data is going to be sent back to your phone number. So if someone spoofs a message (as you) to request the balance, its going to get sent to your phone, not theirs. If someone tries to perform a withdrawl/deposit/transfer, they have to know your account codes. These are completely configurable. So they'd have to know your account codes too (such as "ck" above - which is a simple example), which you can make as cryptic as you want. So at this point you're pretty much safe from someone trying get info on your account.

2. What about account number's?

Clear Checkbook does not keep any account numbers, even their import process does not keep the account numbers. They also advise to not keep your account numbers up there. Give your accounts names, such as "Joint Checking" or "Donn's IRA", etc.

 

CLOSING

In closing, this service WILL simplify your life in regards to check book balancing. Check it out.

And NO, I did not get paid for this... I really think this service is soo good that I had to blog about it.

#    Comments [4] |
 Friday, October 12, 2007

The Ergonomic Consultant

I'm not going to lie, I get hassled, made fun of, laughed at and pointed at. Yes, I'm that guy that carries his keyboard with him when he shows up to a new client. Yes, I'm the "booger-eater" that sits in the corner with his special keyboard. Yes, I will hunt down an old small box in your back room to use for a monitor stand. Yes, yes, yes, I'm THAT guy.

I'm also the guy who will never complain about back pain, neck pain, wrist cramps, sore hands, or numb fingers even though I'm using a laptop all the time. Yes, I'm the guy who is a ergonomic freak.

Being a consultant can be tough at times. You come in as the software ninja (a term I stole from BoodHoo) to save the day with you're "infinite wisdom" (riiiiiighhhht...) and skill. You're forced to sit in the "old dirty cube where Mort used to fart all day long". You're given OLD chairs, and very limited space. A lot of the time you're forced to sit in areas where you'll share a desk with a few other developers, giving you elbow room only. Heck, one time the company I work for had myself and a fellow consultant at a client location doing some work for them. We got placed into the location known as the "Shack". SERIOUSLY.

shack01aAt first, I was very skeptical... my thoughts were "Ok, where is this 'shack' located?" Does it have A/C? (I'm in Phoenix, land of the blazing sun), and "can we even get on the network?" Well, I was introduced to the shack.

The picture to the left, is almost exactly what the "Shack" looked like. It was just a tad bit bigger, maybe another 100 sq ft.

The funny thing was, it WAS the best seat in the entire company. No one bothered you, the A/C was freezing cold, and it was QUIET so you could get your work done. But still, we had sub-par chairs, laptops, single monitors (laptop monitor) and that's about it.

So, in order to make sure my career lasts longer than 5 years because of Carpel Tunnel or some other complications I decided to come up with a few things that can make a consultants life a lot healthier in regards to ergonomics.

Recently Jeff Atwood covered some great ergonomic info on his blog. I was already up to par on all the stuff he covered because I've been concerned with ergonomics since I've started my "insta-just-add-cheesburger-big-butt-chubby-stomach-chicken-gobbler-desk-job" career as a software developer. I've wanted to make sure my career didn't hurt me, physically. He even goes over how others have experienced pain and agony from coding all day/night. (Damn those 12 hour JOLT binges).

I digress, I've compiled a list of MUST haves when working at a client location.

  1. The Microsoft Natural Ergonomic 4000 Keyboard
    1. I bring one with me everywhere I go. I have one at home and one for the road. I think Jean-Paul Boodhoo does the same thing too. I WILL NOT use any other ergo keyboard ever. If Microsoft stopped making these like they did years back, I'll have to resort to the ways of Jeff Atwood of buying them off ebay. For real man. For real.
  2. A good WIRED optical mouse with an easy to use back/forward button combo.
    1. I've been going commando for years, and god does it feel good. I rarely use the mouse, but when I do, I LOVE these buttons. I use a Logitech MX 310. It's nothing fancy and it works. No cordless crap. I hate when batteries go out, or are about to go out. It kills my productivity.
  3. A Laptop Raiser.
    1. This can be a box, a couple of books, anything. This usually stays at the client location at the desk I'm working at. This  helps keep the monitor directly in front of you at eye level. Looking down all day can kill your neck/back. So this helps with that. See Jeff's post on where your eye level should be. This will help you judge height. It's different for everyone, so don't think that 3 Microsoft Press Books that work for you will work for Joe Developer too.
  4. A Decent Chair.
    1. This is the HARDEST commodity to fill for a consultant. We normally get stuck with a crappy chair. I've even been at client locations where I had metal folding chairs as my main seat. So, sometimes it takes a bit of creativity to win in this area. My advice is to ask for a nice chair, that works 80% of the time. The other 20%, you're going to have to get creative. Bring in a pillow, create back support with a jacket, make sure you can at least raise your seat to create the 90 degree bend. If worse comes to worse, sit in their conference room. (Or get there early and steal a conference room chair and roll it over to your desk in the smelly corner - but you didn't hear that from me). :)
  5. An extra monitor.
    1. Getting this is much harder than finding a decent chair. If you can though, get that dual monitor set  up, use your laptop as monitor 1 and the spare as monitor 2. Instant productivity booster.

 

Its not much, but these few things can help your body immensely. Being a consultant myself, I've had to live and learn the ways of working in the worst of conditions. Don't get me wrong, at times you'll get clients that set you up with an $800 custom chair, a dual/triple monitor set up and a machine that could smoke a cigar faster than you're uncle gomez, BUT.... those are few and far between.

So, save your body, save your mind, save your time, and save your sanity. :) Just get comfortable, regardless of the cost.

#    Comments [1] |

Map a Drive in .NET and PowerShell

I recently had to Map a drive during runtime. I purused around the .NET Framework and I didn't find anything so I wrote a quick little snippet of code to do it for me.

CODE TO MAP A DRIVE, GET DETAILS AND DELETE IT IN .NET

// Maps the "H" Drive to \\server\share
System.Diagnostics.Process p = 
System.Diagnostics.Process.Start("net.exe", @"use H: \\server\share");
p.WaitForExit();

// Gets the drive info, spits it out to the console
DriveInfo info = new DriveInfo("H");
Console.WriteLine(info.AvailableFreeSpace);

// Deletes the mapped drive
p = System.Diagnostics.Process.Start("net.exe", @"use H: /DELETE");
p.WaitForExit();

 

Explanation

Its quite simple when we get down to it. We're mapping the drive the same way you'd normally do it from the command line. Opening up the net.exe app, passing in the use command and then the drive letter.

I then spit out some information about the drive and then give an example of how to delete the mapped drive.

 

POWERSHELL

Here's how to do it in PowerShell.

$net = $(New-Object -Com WScript.Network)
$net.MapNetworkDrive("u:", "\\computer\share")

Note, you can use the New-PsDrive command to map a drive in PowerShell, but that will only exist within the runspace that the PowerShell instance created it in. It will not map a drive that is usable by Windows Explorer or a GUI.

#    Comments [0] |