Friday, May 29, 2009

Mortgage Refinance Completed

On Wednesday, May 20, 2009, I completed my first mortgage refinance using United Home Loans. I stayed with a 30-year fixed mortgage, but was able to reduce my interest rate down to 4.625% and save $176.51/month on my monthly payment. The process will have increased my principal by ~$5000, but a lot of that is the interest for the month of May that I rolled into the new loan, a quarter point for waiving escrow, plus some money back to ensure that I didn't have to mess with getting a cashier's check. The closing costs were comparable to the other places I looked, and the rates were quite competitive.

Most importantly, yesterday marked one of the worst days in the MBS (mortgage-backed securities) market, which resulted in rates climbing into the 5.25%-5.5% range. I timed my closing pretty well! The site I follow, Mortgage News Daily, seems to think rates will come down again this year, but it's a whole different feeling to follow the MBS market when I have no direct financial stake in the matter.

A couple people have expressed surprise that I decided to waive escrow, seeing how it cost me .25% of my loan amount. I did some number crunching before coming to this decision, and in my case it definitely made sense. First, I had just paid property taxes, and my insurance doesn't have to be renewed until December, yet they were going to collect 6 months worth up front, or about $3000. I don't think I'd like to pay $3000 out of pocket now if I don't have to, which means I probably would have rolled that cost into the new loan amount. A $3000 loan equates to $15.42/month in extra payments, which means I will recoup my escrow payment in about 3 years directly. That .25% is listed as a discount point, though, which means its tax-deductible. I also get some interest on the $3000 that can stay in my savings account (I actually used it to max out my Roth IRA for the year, so hopefully that will result in even better returns). I also keep the flexibility of scheduling my property tax payments. This gives me the opportunity to shift my tax burden between years a bit by paying either half or all my property taxes in December. Mostly, I don't like the idea of giving my money to somebody and getting nothing out of it, so there is psychological value for me in waiving escrow.

Some of the closing costs are offset by not making a payment in the beginning of June (at the cost of increased principal, of course). This will mean $1500 extra into my pocket this month. I think I will lower my payment to $1400/month on my new loan, however. This will mean an extra $100/month for me, but still be prepaying my mortgage faster than I was on my old loan. Here, I'm fighting the strong psychological benefit of paying off debt with the intellectual knowledge that prepaying on a 4.625% (tax-deductible) loan almost certainly is not the best use of my money. I just love seeing the balance jump down!

401(k) Surpasses Merrill Lynch

Friday marked the first time my 401(k) account was worth more than my Merrill Lynch investment account. Before the recession, this was a milestone I wasn't expecting to happen for another couple of years yet. Since my Merrill account has been halved by the economic downturn, though, my regular 401(k) contributions have a larger relative effect. Of course my 401(k) was halved, too - I don't mean to badmouth Merrill Lynch.

There's nothing more to say on this topic, really. I just found it interesting how the economy tanking altered my various accounts relative value. For example, my Roth IRA is not roughly half of my Merrill or 401(k) account, which is far higher than originally projected. Fun times!

Thursday, May 7, 2009

.NET Compilation for 64-bit Platform Support

At work, I was faced with a problem of a .NET program looking at the wrong registry values, and picking up the wrong machine.config. You see, a 32-bit application running on 64-bit Windows is supposed to be presented with its own 32-bit view of the machine, from registry entries to system DLLs. This is all pretty spectacular, which is why they call it WOW. For more information on WOW64, Wikipedia is your friend.

.NET is a bit tricky, though. By default, .NET applications are compiled with the /platform:anyCPU [MSDN /platform documentation]. This means they will run as 32-bit applications on 32-bit systems, and as 64-bit applications on 64-bit systems. When a .NET application is part of a larger system of applications, this can cause incompatibilities. All the regular C-compiled executables will run in 32-bit, but your .NET app will be interacting with the 64-bit environment and be out of sync.

To solve this, you can simply specify /platform:x86 when part of a 32-bit package, and /platform:x64 when part of a 64-bit package.


The next question is: How do I know if a .NET program was compiled with the /platform option specified as x86, x64, or anyCPU?

For regular applications, a Google search yielded the following blog post on using dumpbin to determine if it is a 32-bit or 64-bit application. For .NET applications, using dumpbin /HEADERS isn't quite enough. Programs compiled with the anyCPU option will still show up as:
14C machine (x86)
32 bit word machine


Dumpbin has other options, though, and /CLRHEADER comes to the rescue. For anyCPU applications, the relevant portion is:
1 flags
IL Only

x86 applications get:
B flags
IL Only
32-Bit Required


Dumpbin is a highly useful diagnostic tool, as I find out often.

Update: I just tried dumpbin on an /platform:x86 application running on 32-bit Windows, and the "flags" attribute had no lines beneath it, but it looks like the "1" vs "B" is still accurate. Perhaps this expansion is new in Visual Studio 2008's dumpbin.