Most IDEs will format your code for you these days, making sure that your braces are always where you want them to be, and that everything is indented properly. Some will do even more for you. Eclipse provides save actions that will make sure that you always include braces around blocks, and even sort your methods and declarations for you.
How much control do you turn over to your editor? Lately I’ve been inclined to let the editor do as much as it can. Aside from aesthetics, I’ve decided that the single most important advantage offered by consistently formatted and organized code is high quality diffs when you’re reviewing your code history.
If you enforce the same formatting and organization on your code, theoretically the revision history for a file will contain only substantive changes. That provides real value as far as I’m concerned.
The only disadvantage I’ve found so far is that if you use save actions to organize your code and you save a file that has conflicts marked, the save action will make a huge hash of it. (Maybe Eclipse should have an option for disabling save actions when saving a file that has errors.) That’s easy to reverse, though, with an Undo.
Anyone else have an opinion on this? I’m finding myself wishing that I had a tool that does as good a job organizing and formatting Ruby code as Eclipse does with Java.
How the mortgage crisis winds up
Tyler Cowen posts on the coming bailout of Fannie Mae and Freddie Mac. Bottom line: after all of the stupidity, greed, and outright fraud, we the taxpayers will all pay up to make sure that the housing market doesn’t fully collapse. If you see a house flipper, mortgage broker, or investment banker who didn’t overextend themselves and lose everything, I think you should be allowed to punch them once in the face with impunity.
Back in April, David Einhorn gave a speech called Private Profits and Socialized Risk. The title alone sums up the current situation.
The bottom line, though, is that the government must bail out these agencies. Here’s why. Freddie Mac and Fannie Mae buy up mortgages and package them as investments that are sold to institutional investors (like foreign governments, among others). They purchase these instruments even though they pay a relatively low interest rate because they assume that the US government will guarantee that the Freddie Mac and Fannie Mae won’t default on those investments. If that assumption does not hold, the securities sold by Freddie Mac and Fannie Mae will have to pay a much higher interest rate to make up for the higher than anticipated risk profile. That, in turn, will drive up the mortgage rates home buyers pay, slowing down the housing market and killing demand for more expensive homes.
Letting these two quasi-governmental companies fail would crater an already failing housing market, destroying an awful lot of wealth. That’s not something any politician is going to let happen if they can stop it (nor should they). The US is sort of like the family where the single income earner takes month’s wages and blows them at the casino. You may hate them for what they did, but you still have to take them back in because they’re the only one with a job in the first place.
Update: Add Fannie Mae and Freddie Mac to the list of things about which I know more than Sarah Palin.