Archive for May, 2009
How to Refinance (do’s and dont’s)
If you’ve ever refinanced, you know that the experience is very similar to buying a car. There are just so many options that it is next to impossible to compare offers. You are never quite sure what you are going to get in the end. There are things like APR that help consumers compare loans but comparing loan offers using APR is only true when you are planning to keep loan for full 30 years. I bought home once and refinanced now. After 2 experience I have learnt a trick or two to get the best out of the process. Here they are.
Brokers or Banks?
In general brokers are better at getting rates then single bank. Just as you would normally not buy airline tickets directly from the airlines and go to brokers like Orbitz or Expedia, going to brokers help. But it doesn’t hurt to contact more than a few people. Comparision shopping is always a good thing.
Good Faith Estimate:
The estimate of closing-cost, that is. Don’t hesitate to give your personal information to get a written estimate. Written estimates are the best thing you will ever get from any closing agent. Dont trust what they say on phone, every broker will say they can match other’s offer on phone. It is only when you get written estimate that you know how much you are going to pay out of pocket.
Discount points / Origination Points:
Option, options more options. I am not saying these are bad things. But you should be a little math savvy when choosing between paying origination fee or discount point to get better rates vs. getting less than better rates. This is not difficult. You need to have an idea how soon you are planning to pay off your loan and which option will let you come out ahead in the end. It should be easy to convert 1 point of loan over next 10 years (or whatever your pay-off time frame is) to equivalent interest. And then decide if you want to shell out that much money upfront to come out ahead at the end of your loan. In fact, that is what APR does over a period of 30 years. You can’t depend on APR unless you are planning to make minimum payments each month and are planning to keep your loan for a full 30 years…
Gotcha:
Never pay for $350 or similar application fee before you are ready to lock rates. Often brokers will try to get you to pay that amount so you get stuck with them. The logic is understandable in that this covers the lender for expenses like home-appraisal and rate lock. However, if you shell out this amount before you are ready to lock you are stuck. This is the mistake I made. I trusted the agent of National City Mortgage Corporation and he confirmed thrice that I will be returned every single penny if I didn’t close with them. And as it turns out they didn’t. I ditched them anyway. The other agent that I finally went with did all processing (home-appraisal etc.) _after_ I locked rates with them. Yes, there is risk that you may not get the locked rates if your home-appraisal or your credit turns out to be less then optimal but the chances of that should be nil since you know where you stand on both those front.
So, never pay anything before you are ready to lock. When you lock and pay the initial fee, your work is mostly done, you are done shopping. That’s when your agent’s work begin.
Good Luck and again, don’t go with National City Mortgage. Borkers need to understand: “Honesty is the best policy”.
Updating hosts file on Windows Vista
I had hard time to get Windows Vista to recognize my changes to hosts file… until now.
Stopping the DNS cache service did the trick:
net stop dnscache
Enjoy!
Cygwin: installing Webrat on cygwin
gem install webrat
may fail on cygwin when building native library. In my case, I had to install cygwin package libxslt-devel.
Ruby 1.8.7: NoMethodError: undefined method `[]‘ for Enumerable::Enumerator
After upgrading ruby from 1.8.6 to 1.8.7, you may run into this issue:
NoMethodError: undefined method `[]‘ for Enumerable::Enumerator
To resolve this, create a initializer file (in config/initializer/ruby187_compat.rb)
unless '1.9'.respond_to?(:force_encoding)
String.class_eval do
begin
remove_method :chars
rescue NameError
# OK
end
end
end
Ruby Testing Minimalist support
I have normally used irb shell or simple ruby scripts to try simple things out. I wondered what would be a minimalist unit test which would lend me all the assertion support and related goodies. Today I have it:
require 'test/unit'
class TestSort < Test::Unit::TestCase
def test_something
assert_equal(x,y)
end
end
Enjoy!
Ruby Enterprise different from Ruby MRI
I am in the process of switching a project from Ruby MRI 32-bit to Ruby Enterprise 64-bit. I noticed that they are not exactly the same. For one, the order in which active-record objects are fetched from database is different. This manifests as a failing test assertion when comparing has-many objects. The tests that always passed on ruby MRI fail under Ruby Enterprise.
Also, we noticed that mysql on new machine is different. The primary keys assigned to active-record objects are different from those on old machine. While it is never a good idea to hard-code database IDs for test assertions, it worked never the less since databases are freshly created before each test. This could be due to the architecture differences between those machines (32 vs. 64 bit).
Just a few gotchas …
Linux: Detecting system Architecture
Following commands help with determining OS/CPU/hardware on a linux system:
cat /proc/cpuinfo
uname [-a -i -p]
-a = print all info
-i = architecture
-p = processor
Firefox: which plugins are installed
Just learnt about firefox’s about: protocol. To detect what firefox plugins are currently installed, type following in URL box:
about:plugins
Remember, no spaces on either side of colon.
Centos: querying installed packages and versions
Here is a command that lists all packages installed on centos (or any linux using yum package management system):
rpm -qa --qf="%{n}-%{v}-%{r}.%{arch}\n"
The beauty about this protocol is the output is formatted to display version architecture stuff in one line – great for grepping…
CGI escape, unescape, escapeHTML, unescapeHTML
I just can’t seem to remember which to use when so here are the 4 great helpers when working with URLs and HTML:
When constructing URLs, you use escape and unescape:
url = "http://site.com/?address=" + CGI.escape("123 Main St, City, ST, 99999") # url: http://example.com/?address=123+Main+St%2C+City%2C+ST%2C+99999
unescape does the reverse.
When rendering text inside HTML page, you use escapeHTML and unescapeHTML:
raw_html = CGI::escapeHTML("<div>An example HTML to be displayed raw on an HTML page</div>") #raw_html: <div>An example HTML to be displayed raw on an HTML page</div>
unescapeHTML is for converting an html-escaped string back to proper HTML form.
Simple, but you often forget!