Monday, September 29, 2008

Financial Weapons of Mass Destruction - Credit Default Swaps

While Bush was busy searching for weapons of mass destruction in Iraq, he neglected to bother about the ones that were being "stockpiled" in his own country. No we are not talking about warheads, but Credit Default Swaps - or "Financial Weapons of Mass Destruction" as Warren Buffet, the most successful investor in the world, likes to call them. Now that they blew up in America's face, leaving the country in recession, and spreading the fallout across the world, we will try to see what these things were about.

So what exactly are these credit default swaps? Lets say Bank X loans a large sum to a lets say Tom for mortgage. There is a chance that Tom might not be able to repay his mortgage. In that case, the bank stands to lose the money loaned - which is a major risk for it. So to offset the risk the bank enters into a Credit Default Swap contract with a counter party. Bank X then starts paying fixed payments to the counterparty. In turn, the counterparty assumes all risk of the person defaulting on the loan itself. Although this looks like a typical exchange, the rotten part of it is simply that - the seller of the contract does not need to have any real assets to make the contract.. and can technically go bankrupt.

So a credit default swap makes everyone happy - as long as Tom is making his payments. For Bank X, it kept a huge amount of default risk off its books, and for the counterparty, it is pure money for nothing. But once Tom does not pay his mortgage payment, as it happened, then the system begins to unravel... Bank X demands money from the counterparty, who might go bankrupt since he does not have enough assets to make good his promise. The counterparty is also unable to raise the cash, as the house value would have fallen in the market. So it declares bankruptcy. Immediately, the huge losses starts to appear on the books of Bank X... which takes everyone by surprise, since it was not "expected".

The market for Credit Default Swaps is Over-The-Counter, and not regulated well. In some instances big firms used to buy CDS contracts from little known players, who declared bankruptcy once the defaults started piling up, forcing many big firms to become insolvent. The notional value of the CDS market grew from a couple of hundred billion dollars at the end of 2000 into more than $40 trillion by 2005.

This is one of the reasons for the US Govt trying to bailout firms. Since if they have lots of CDS contracts, then shutting them down would force some other company to take huge debts onto its books immediately, and itself become insolvent, starting a chain reaction. The govt hopes that this will in the meantime allow the values of the assets to grow slowly, and reduce the impact on the firms.

Sunday, September 28, 2008

Windows and the hardcore Linux user

Being a hardcore Linux user is not easy, if you are forced to use Windows, especially by official decree. When I used to work for Motorola, we used to get only Windows machines, and the closest thing to a Linux machine was a Solaris 8 server. I could not get a Linux machine without any official project requirement. In the current startup where I work, Linux is the defacto standard, so my life is much easier.

Recently as part of a new assignment, I had to use a firmware compiler, which unfortunately runs only on windows. So I started installing windows on another machine. After installing XP (after a couple of BSoDs and reinstalls tending from heavy infections), I tried to download the compiler software, and I found out that the network card driver was not installed. I was totally pissed off, and then I remembered that I had a Fedora 9 Boot CD, which made the situation akin to someone asking Salman Khan to remove his shirt, or Deve gowda to take a nap... I immediately installed Linux on the machine, and once it is done, booted into linux and figured out the type of hardware from lspci. I started downloading windows drivers for the network card, and it took me quite a while to get proper network drivers.

It made me realize that I have become addicted to Linux... which although does not have a support group like Linux Addicts Anonymous, is a serious impairment for someone living in Bill Gates's Paradise. Ever since I started using only Linux, both in office and on my personal desktop and laptop, my patience for waiting for stuff to happen was gradually thinning all the time. I became a crazed maniac asking for lower response times to actions - until now. Now that I have to use Windows atleast once in a day, I am back to being more patient waiting for my computer to respond, or taking care of it like a loving father while it throws tantrums like a BSoD or plain stops responding to my pleas or gets sick. Guess with due effort, I can become a WindowsXP certified user soon enough. However to become a Windows Vista certified user, I think I would need a prescription medication like Prozac.

P.S: I am not a Linux Fan, just a user. If there is anything I am a fan of, it would be the Windows OS from a shareholder standpoint.

Ethipothala Waterfalls - The hidden beauty

It has been over a month since my last vacation at Shivanasamudram, and I was itching for some action. My friend and I decided to go to Nagarjuna Sagar, along with some of our colleagues. I was not too excited about this trip, since I have been to Nagarjuna Sagar more than 4 times before, including once on a bike. Little did I know that this trip would be an experience I wont forget anytime soon!

We took a Qualis, and started late at 8:30 AM from the City. It was almost 11:30 by the time we reached NagarjunaSagar. There were 2 gates open on the dam, which was spectacular. After roaming around at the foot of the dam for an hour, we had our lunch. Unfortunately we realized that the last Ferry to Nagarjuna Konda, an island in the man made lake, leaves at 1:30 leaving no time to catch it. So we decided to go to Ethipotahala waterfalls, about 15 km from the dam.

I have never been to the foot of this waterfall since I were never aware of any path leading there, and due to the warning signs about crocodiles everywhere, we did not venture closeby earlier. However this time a little kid approached us and said that he could take us to the foot of the falls. Initially Raja and Chandra went with the boy, while we stayed back not too excited about it. But they came back and told us that it was a must-see. So we too joined them, and the path was filled with crossing steams with moss covered rocks, making the mini trek very tricky. After about 30 minutes we reached the foot of the waterfall and it was beautiful. The waterfalls falls were filled with water due to the recent monsoon. The scenes were breathtaking. There were huge stones in front of the waterfalls on which we sat, only a couple of meters from the waterfall, with the water spraying on our faces. It was truly breathtaking! We stayed there till 5 PM awed by its beauty. However since this is in a valley, it gets darker much before sunset, so we rushed out of there by going through the same path, which somehow felt little easier on the way back.

We started the long journey back home at 6PM. I had a raging headache at that time. But overall I knew that this was one trip which was well worth it. Some of the pics are available here.

Wednesday, September 24, 2008

Pay your Electric Bill online (in AP)

Tired of going to the E-Seva center and waiting in Q for 30 mins or so to pay an electric bill? Well if you have a Citibank account, you can pay your electric bill without any additional charge. If not anyone can pay their bills at esevaonline. None of this requires you to leave the computer at all. I am mentioning this since many of my friends indicated that you need to register before you can pay your bills online, but that is NOT the case.

To actually pay the bill in Citibank, you need to enter the information given in the bill itself in the form presented in the Pay Utility bills online section. And Citibank transfers the amount to APCPDCL without any additional charge. The only problem with this is that there is no feedback indicating that the bill was successfully paid.

If you are out of city or country, then you can use the website esevaonline.com. Register yourself and create an entry for your electric bill. Then you can check the bill amount online, and pay it through that website itself, or you can login to citibank and pay the bill there. Although I haven't paid the amount using the esevaonline website, I believe it should be reliable.

Tuesday, September 23, 2008

Dollar in the dump

The massive bailout of the financial sector, valued at nearly $1 trillion, is causing a record deficit, which is sinking the dollar. Already investors have started moving away from dollar into commodities. Commodities across the board like Gold, Oil, Copper etc are seeing a massive rally. (Oil price increased by almost $35 to $130, and is expected to go up.) The details of the bailout have also not emerged completely, leading to volatility, which is only expected to get worse.

Dollar's position as a reserve currency will be challenged if the slide continues. China has billions of US dollars in reserves, so if it sees that the dollar value is dropping, it may start dumping its dollar assets in favor of other more resilient assets. Other countries also have substantial dollar reserves. This would release a lot of dollars into the global markets putting much more downward pressure on the dollar. The only reason against that happening now, is that the Euro, the nearest alternative, is also in a pretty bad shape.

To control the drop in dollar, the government has to reduce the deficit. One way is to reduce expenditure, which appears to be nearly impossible due to the bailout plans of Paulson. The other alternative is to increase taxes, which is equally unlikely. A weak dollar will cause much harm to the economy and raise inflation, leading to a very damaging recession.

A positive effect of a weak dollar is that it will increase exports, and make imports more costlier. But this is a long term effect, which wont necessarily kick in, in the short run.

The current bailout, as bad as it is, is the only way to offset much bigger crisis in the American economy. But the loss of confidence in the dollar will take a long time to recover.

Monday, September 22, 2008

TCP Offload Engine support in Linux

TCP Offload Engines (TOE) are customized hardware which handle TCP connections completely in the network card itself, instead of in the kernel. Lately 10Gbps Ethernet cards are becoming the industry standard in the high end server market. A simple rule of thumb regarding TCP processing in the CPU requires 1 HZ of CPU for every 1 bit of TCP data handled per second. This means that a 10GigE card, requiring 10 GHz, can quickly eat the CPU like there is no tomorrow. Even with multiple CPUs and multiple cores per CPU, the impact is significant.

Added to this, IEEE standards are already being prepared for 40Gbps and 100Gbps Ethernet. So in this situation, using TOE becomes inevitable. There are already many TCP functions already being done in hardware like checksumming, LRO (Large Receive offload), LSO (Large Send Offload) etc. But a TOE provides a complete end-to-end solution.

TCP Offload Engines were never a hit with the linux networking community. Linux Kernel Maintainers, esp David Miller, have been against the idea of TOE due to various valid reasons like it reduces maintainability of code, etc. Also the kernel maintainers argue that TOE was only a stopgap solution, before CPU speeds caught up with the loads, citing cases in the past where TOE was implemented even for 100Mbps links. More details about their position can be found in this article - Linux and TCP Offload Engines. This has caused a situation where the 10GigE vendors like Chelsio are forced to maintain the TOE patches to the Linux kernel, out-of-tree. This causes the code to be inherently unstable.

Anyway, the end users do not face any loss of functionality since the vendor provided patches to the Linux kernel can be used to build kernel modules, which provide support for TOE hardware in Linux machines. This is what I like about Open Source. You do not have to be bound by what others think. You leave that decision to time.

Friday, September 19, 2008

Republican VP Sarah Palin's Yahoo! mail hacked

Two days ago, the email account of Ms. Sarah Palin, the current Governor of Alaska, as well as the Republican Vice Presidential Candidate's Yahoo! Email account - gov.sarah@yahoo.com was hacked. The nature of the hack is the well known "forgotten password" of Yahoo! link, which asks for some personal information before generating a new password. For a public figure like Palin, most of this information is not really private... which means the existing security measures need to be looked at in a different light. Even for normal ppl, the information is not too difficult to get, except that there are easier ways like keyboard logging, social engineering etc.

Most services on the web try to escape this predicament, by giving the option of mailing your new password to your email address. But alas this cannot work email accounts itself. It is important that this issue be addressed by Yahoo! and other webmail providers, since there are many people who lose information through such loopholes.

On your end, to reduce the possibility of such attacks, you should give fake information for such email accounts to prevent public information on the website. And you don't have to give the real name of your pet either! And for the love of God, remember that information, since if you forget that, no one is helping you out.

The complete log of emails and information used to hack the account is available at the Wikileaks website.

Thursday, September 18, 2008

A Wednesday - An Exciting Thriller

Generally I have a low opinion of the average run of the mill movies which get released by Bollywood or the other Tollywoods. They generally run on a hackneyed, beaten-to-death formula. But a few of them are gems. "A Wednesday" by Neeraj Pandey is one. It is a gripping thriller about a wednesday when a series of incidents changes the lives of all those involved.

The movie starts with a phone call to the police commissioner of Mumbai (played by Anupam Kher), about 5 bombs placed at various locations in Mumbai. The caller (Naseerudeen Shah) gives extremely detailed instructions about how to release known terrorists. From then onwards, the movie progresses into a gripping thriller, with many twists and turns to a very satisfying conclusion. The tempo of the film is maintained till the end, which is very rare. Most movies lose their tempo after a good start, but not this one. A definite must watch.

Five Stars any day...

Socialism for the Super Rich - Moral Hazards in US economy

The recent bailout of Freddie Mac, Fannie Mae and AIG, by the US Govt to protect the faith in US markets has created a moral hazard. A moral hazard indicates that while you take a risk, the profits from it go exclusively to you, but losses are distributed to parties which do not have anything to do with the deal. This creates a situation which rewards an overtly risky behavior.

The US taxpayers are paying for the mistakes of a few who tried to make a lot of money in the US real estate and mortgage businesses. The Fed by arranging the shotgun marriage of Bear Sterns to JP Morgan a couple of months ago, while assuring at least $30 billion against losses from Bear's trades, indirectly rewarded the overtly risky behavior, by letting the taxpayers buttress the downside of the risks. Freddie and Fannie losses could potentially run into hundreds of billions of dollars. The Fed tried to take a stand by not bailing out Lehman, but the odds were stacked against its favor as the AIG posed a huge counterparty risk to all the financial markets. In the end, the AIG bailout cost the taxpayers $85 billion.

This is not new for the Fed. It arranged the cleaner disposal of Long Term Capital Management (LTCM) Hedge fund after it blew up in 1998, since the fund with $10 billion in deposits and controlling over $1 trillion of the economy through leverage would have brought down the entire global economy.

Moral Hazards have always existed in the world of Hedge funds, where the fund managers gets to take home a large part of any profits he makes. Losses would typically result in him getting fired, but without any monetary damage. This caused the Hedge fund managers to take up increasingly risky trades. Mutual funds were somewhat safer due to strict regulation which limited the riskiness of trades they undertook.

In a free market enterprise the Fed has to let these institutions fail for their mistakes. But they would also cause global economic collapse and cause a lot of harm to the common man. So this is amounting to near blackmail by these firms (a more apt term would be brinkmanship).

Other than the explicit bailouts of Freddie, Bear, AIG etc, The Fed is also implicitly bailing out the other firms by keeping the interest rates extremely low, at a time when inflation is eating into the savings of the common folk.

So who is at fault? The fault is the lack of proper regulation and laws governing Investment banks and financial institutions in general. For example the repeal of the Glass-Steagall act is one such action, which increased the moral hazard since banks can also do investment actions and lose lots of money rendering them insolvent. This would cause the FDIC to dole out money to the depositors from tax payers if the banks fail. This is definitely not the best solution, but can be one solution which can be used to reduce this moral hazard, which if ignored further would result in increasingly worse depressions, as traders start taking increasingly risky trades.

Although it is against the spirit of free markets, the US Govt must be more proactive in analyzing the markets and bring in relevant laws and regulation, instead of waiting for the storm, to pass new laws.

Tuesday, September 16, 2008

Tunneling to the inside - using SSH

Many networks are setup in such a way that you can access a machine (lets say GGG) in the network through SSH and then you can access any other machine (lets say XXX) in that network using protocols like SSH, telnet, samba etc. But wouldn't it be great to access those services right from the machine (lets say LLL) you are sitting at itself?

Enter the SSH Tunnel. SSH tunnel could be used to create an end to end SSH connection between the local machine (LLL) and the gateway machine (GGG). Then you can access any machine (XXX) from (LLL) itself. The best part is you do not have to be root for this!

First establish the SSH tunnel connection between GGG and LLL using the following command on LLL
ssh user@GGG -L 2000:XXX:22 -N

where, 2000 is the local port on LLL which will act as
a gateway (this can be any port you want)
22 is the remote port on the machine XXX to which you
want to connect to (For example this will be 23
for telnet, 139 for SMB, 22 for SSH etc)

Now your tunnel is setup. Just connect to the machine by connecting to LLL on port 2000 - you will be automatically forwarded to connect to 22 on XXX machine!

The Bursting Oil Bubble - Aftermath

The Oil bubble has more or less burst for now as expected. with the price of crude down to nearly $94 from the peak of $147 in July. The main reason for the decline is that the US Dollar is once again stronger than earlier. Since Crude is priced in dollars, any fall in dollar value will increase the dollar price of crude and vice versa. Oil is one of the main commodities that is also used as hedge against the dollar, and now that the dollar is doing good, Oil is getting dumped in favor of US Treasuries and the like. The price of Oil is expected to drop further, since the Lehman bankruptcy will possibly unwind some Oil trades.

The global economic downturn is also playing its part, by reducing the demand for Oil. The last time the world economy was down after the 1997 East Asian crisis etc, Oil fell to under $10 a barrel. The cracks in the OPEC are once again out in the open, with Saudi Arabia not wanting to reduce its production. Politically also, the fall in Oil price is significant with the tide turning away from the Oil producers - especially the politically active ones like Russia.

The presumed demand from rising economies like India and China causing a global upward price spiral proved to be unfounded at least in the short run. And it also showed that however inelastic the price demand curve of oil is, there is still a curve there which causes unrealistic prices to throttle demand. Airlines can once again breathe easily.

Now-a-days, none of the bad news is really affecting the crude price slide very much. News such as Hurricane Ike likely to impede Oil production in the Gulf of Mexico, increased terrorist activity in Nigeria or likewise, which would have caused massive rallies earlier, are causing no more than a whimper, and the price slide stops temporarily before resuming its journey down to a more realistic value.

On the negative side, the push for alternatives to oil is once again reducing, indicating the short sighted nature of the public. Also the reduction of premium on Oil, removes the financial incentive for private investors to pursue alternative renewable fuels. Oil has also stopped being a major campaign issue. This is high time the coming Govt in Washington takes a stand and pumps money into the research for alternative fuels, instead of bailing out companies like the Detroit Big Three to prop up the economy in the short run.

The dent made by the spike of oil prices, made the American consumer more aware of the risks of owning a gas guzzler. It will be a while before this harsh lesson is forgot, which is good news.

The American consumers at the Pump still see Oil at more than $4 since Hurricane Ike destroyed the refining capacity on the east coast, resulting in serious Oil shortages. But this is a temporary phenomenon which should pass in a week or so.

I really applaud the Indian govt's decision to NOT reduce the price of Oil at the pump, even though it is the election year. This goes a long way in reducing the oil subsidy to more manageable levels, and will leave the image of India as a good investment destination intact.

Nightmare on Wall St - Failures of Lehman, Merryl, AIG, WaMu....

In The Simpsons Movie, when Bart Simpson, utterly embarrassed by a situation, moans - "This is the worst day of my life!", his father replies - "This is the worst day of your life, SO FAR". The same could be said about the happenings in the last week of the US Financial sector.

What a week it was. just when you were thinking that the worst was over, the financial sector keeps hitting new lows. Couple of months back Bear Sterns was taken over by JP Morgan in a Shotgun wedding arranged by The Fed. Markets were a bit stable, and now it spread like wildfire in the last week. These are a couple of things which went bad in the financial sector in the last week.

- Freddie Mac & Fannic Mae were nationalized
- Lehman Brothers stock in free fall resulting in its declaring Chapter 11 bankruptcy
- Merryl Lynch bought over by Bank of America, after a free fall in its stock
- AIG group stock going down, resulting in its "restructuring"
- Washington Mutual (WaMu) Bank's stock tumbling
- Wachovia Bank's stock nose diving

So now out of the big Five wall street investment firms, only two - Goldman Sachs & JP Morgan were left standing. This extreme uncertainty in the financial sector trashed the DowJones, making it face the worst percentage fall in 6 years.

The ticking timebomb here is that the investment firms make a lot of trades with one another. Since there are a very few big firms taking up both sides of most of the trades, the trades suffer from counterparty risk. i.e. if you make a trade which realized a profit on the books, but the counterparty to the trade cannot pay up since it went bankrupt, then you lose too since you wont be seeing any real money from them. Now that Lehman has gone down, all the trades done with it need to be unwound, or a loss taken. When these losses start appearing on the books of other investment firms, they too will start taking a hit.

Lehman's is the biggest bankruptcy filing ever with $639 billion in assets. So there are bound to be repercussions everywhere in the financial sector. UK regulators have already asked firms to declare their exposure to Lehman. Citi group looks like it has a serious exposure to Lehman, which if it did, would seriously undermine its current precarious position.

Already there is a talk of a further rate cut by the Fed, which, at current inflation levels, can only be bad.

So is the rock bottom hit? is this the worst? I cant help thinking of the answer given to Bart Simpson...

Sunday, September 14, 2008

Continue Browsing during Power failures

Power cuts (or load shedding, black outs, or however you want to call them) are very frequent and frustrating here in hyderabad. Other times we face the low voltage situations (also called the brownout). In such cases I would be able to continue using my laptop (given that its a 9 cell Thinkpad), but lets face it - Very little work of value (or timepass, as my friends like to call it) gets done without the INTERNET! It is even more frustrating when you tend to work from home, and you are cutoff due to power loss and have to rush to office.

The best way to beat this situation is to bring out the old UPS you used for your old desktop. Even if u never had a UPS, you can buy a cheap one for less than Rs 1500/-. Once you connect your modem and wireless router through the UPS, you will get a backup of almost 2 hours straight. However if you are using Sify or other ISPs which given you a direct ethernet cable to your house you might be out of luck, since the local hub at your operator will lose power. This was one more reason for me to switch from Sify Broadband to Airtel, other than Sify's pathetic customer care and reliability issues (15 days of no internet in a month makes you go crazy!).

Also, if you are watching a movie with friends and power goes out, you can connect the speaker set to the UPS, to get the enhanced volume. Or in emergencies you can charge your cell phone on it too.

Converting AVI/MPG to 3GP files in Linux

The best way to convert an AVI/MPG video file to 3GP (like for viewing them on your cellphone) is to use the opensource program - ffmpeg. The ffmpeg was also the starting point for the most famous movie player for linux - the mplayer suite.

To start using ffmpeg, First download the latest ffmpeg source code. Run configure on it using the following command line, followed by a make and make install.
./configure --enable-nonfree --enable-gpl --enable-libamr-wb --enable-libamr-nb
--enable-libmp3lame
If you do not have the libamr-wb and libamr-nb codecs installed, download the following packages - amr-nb-7.0.0.2 and amr-wb-7.0.0.3 - and configure, compile and install them. The description of these packages is given in detail here.

NOTE that if you have FFmpeg installed, you need to make sure that you see both --enable-libamr-wb and --enable-libamr-nb in the configuration. You can check the configuration of ffmpeg by running ffmpeg > /dev/null.

Then run the following command to convert the AVI/MPG files to 3GP
ffmpeg -i inputfile.mpg -s 176x144 -b 300k -r 10   -ar 8000 -ab 12.2k 
-ac 1 -f 3gp -aspect 4:3 outputfile.3gp
Upload to your cell, and it will help you get over lots of boring times :)

Monday, September 8, 2008

End of Credit Crisis in Sight - Freddie Mac & Fannie Mae nationalized

The Credit crisis which has roiled the markets for over 2 years is now hopefully nearing an End with the near-nationalization of the US Secondary Mortgage Market Majors - Freddie Mac and Fannie Mae, yesterday. This action has fed a lot more confidence into the credit markets reeling from the subprime crisis.

The US mortgage market is structured in such a way that, you have the primary lenders (banks like Wells Fargo etc) who make loans to individuals for the purpose of housing. However, these mortgages run into hundreds of thousands of dollars. So a normal lender can only give so many mortgages, before his cash flow is completely stuck in these extremely long-term (upto 30 year long) loans. So to add more liquidity to such a market, the US Govt established the Freddie Mac in c1970, which would buy the loans (at its discretion) from these primary lenders. Having got back their initial capital, the primary lenders can provide other people loans. Freddie Mac in turn pooled and securitized (oversimplification:bundled) these loans and sold the resulting securities to investors in various organizations. Freddie Mac, guaranteed the rate of interest on these securities and hence assumed the credit risk, for which it charged a fee. Essentially, this means that any non-payment of mortgage by a person, will be made good by Freddie Mac. Fannie Mae is also essentially similar, except for its beginnings. Between themselves, these organizations own over 50% of all home loans in the US.

Technically these organizations were supposed to be Government Sponsored Enterprises, but essentially private corporations owned by stock holders, without any Govt insurance for their loans. However, due to their size and presumed US Govt backing, they had acquired the tag of "Too big to fail", as in, if they fail, they would drag down the economy with them. This caused them to take up riskier mortgages from the primary lenders. At last count, Both Freddie and Fannie had over $12 Trillion exposure to the mortgage market.

Now that the Subprime crisis has precipitated a downturn in the US housing market, this downturn has resulted in a lot of mortgage defaults (although Freddie Mac does not buy subprime loans), which caused Freddie & Fannie to declare losses of nearly $15 billion last year. This has led to their credit rating dropping to Junk status, forcing the premium on loans to them (bonds) going over 2.5%, making it very difficult for them to raise much needed new capital.

To alleviate the crisis, the US Congress in July passed a law, with bi-partisan support, allowing the US Govt to step in and bail out these corporations if required. This was supposed to give confidence to potential lenders that their loans to Freddie would not go bad (thereby reducing the risk and hence premiums on the bonds). But this action backfired badly, since people know that any such nationalization would wipe out Freddie's stock value. This caused its share price to plummet to less than $5. This precipitated a crisis, forcing the Govt to act immediately and nationalize them both. As expected, Freddie Mac shares dropped to less than 25 cents.

So now the US taxpayers are "bailing" out these corporations. The impact of the bailout is not completely known, and is supposed to be in tens of billions of dollars, if not hundreds of billions. This will also cause tighter regulation in the housing markets, with people having even prime credit ratings facing difficulty to make a mortgage. The US treasury bills have also dropped.

On the brighter side, however, markets are very optimistic over the measure since the credit markets will now be more liquid, stock of various banks which gave loans to Freddie (like Citi Group) have gone up a lot, the premiums have also dropped on mortgages. The last one will once again hopefully rejuvenate the housing sector, which makes up over 25% of the US economy. So overall the housing sector can recover from the glut of unsold inventory, and once again start growing. These will also help to reduce the effects of the current recession the US economy is undergoing.

Saturday, September 6, 2008

MPlayer - Overcoming in-built low volumes of media files

Many times, the AVI files of movies end up with a very low audio volume causing a lot of pain for use with laptop speakers (esp like ThinkPad), which do not have a very wide range of volumes like headphones or traditional speakers. To overcome this issue, many media players provide an option to increase the volume more than 100% (upto 400% in case of VLC Media player).

After googling and RTFMing for a while I figured out that the way to do this in MPlayer is to use a software volume mixer instead of the soundcard's mixer. You can run mplayer with the following additional options
mplayer -softvol -softvol-max 400 

The 400 indicates that you want to increase the output by upto 400% of the base volume indicated in the media file.

This link has more information on using an audio filter instead of using a software volume mixer to do the same. Happy movie watching!!

Wednesday, September 3, 2008

Ripping DVDs into AVI files

Ripping DVDs in Linux using mencoder is tricky business. No doubt mencoder is the most powerful tool at your disposal with a wide variety of options to convert practically from any format to any format. This in turn also becomes its disadvantage - there are too many options, which an ordinary user cannot understand. There were nearly a 1000 options out there, with a variety of combinations between them, most of which keep taking about stuff like deinterlacing, quantization and key frames.

After trying a number of times to rip DVDs unsuccessfully in Linux, I recently struck gold, while googling, in a discussion forum on how to do this correctly. This is the command that worked flawlessly for me
/usr/bin/mencoder -vf harddup -vf-add 
smartblur=.6:-.5:0,unsharp=l5x5:.8:c5x5:.4
-vf scale=480:360 -xvidencopts
bitrate=900:profile=dxnhtntsc -lameopts
cbr:br=128:aq=0:vol=1 -oac mp3lame
-ovc xvid -o outfile.avi *.vob

The scale= could be used to set the new size of the AVI file. Lesser sizes will result in lesser space. The bitrate= also controls the quality of the movie generated, and is inversely related to the size of the generated AVI file.

Download the mencoder (located in the mplayer package) from some default distribution (I used yum to get it), so that most of the required options are compiled in.

Tuesday, September 2, 2008

Google Chrome - A New Era


Recently I heard about this new browser from Google called Google Chrome, which will be available in (Surprise! Surprise!) Beta version. The Google guys, true to the innovative streak, made a comic, justifying yet another entry into the world of browsers, already filled up with heavy weights like IE, firefox etc. However after going through the feature list, I was realized that this was not just another browser. It's design was more closer technically to an Operating System, than to a browser.

There is a fundamental paradigm shift happening here. The browser is the new Operating System. We have already seen a ton of web applications, like Spreadsheet, presentation apps etc, most of which were thought to be almost impossible to run in a browser.

Microsoft with its Windows, is entrenched in the Desktop OS market. I do not see any operating system which can challenge its dominance there. But Google has, instead of taking it head-on, is completely circumventing the Operating System, making it as just another commodity. More than 20 years ago, IBM thought that hardware was the key and the operating system did not matter too much. Microsoft came and commoditized the underlying hardware, and things were never the same again.

I see the same thing happening now, with Google commoditizing the Operating System market. Beyond a point, people will stop caring about what OS their machine is running anymore than people now care about what BIOS their machine is running. (Just to complete the analogy, IBM made the mistake of not doing an exclusive license of DOS, which sealed its fate. Microsoft's mistake happened almost 9 years ago with the introduction of the XMLHttpRequest)

A New Era has begun. If Google can pull off this browser thing decently, then history will definitely repeat itself.