Ads




Profiles

Blogroll



  • Ashish's Niti - Old Blog

Your email address:


Powered by FeedBlitz

« February 2007 | Main | June 2007 »

March 2007

March 16, 2007

What would Gandhi Really Do?

WHAT WOULD GANDHI DO? Fred Thompson thinks Code Pink's sanctimonious question is actually reprehensible.

During World War II, Gandhi penned an open letter to the British people, urging them to surrender to the Nazis. Later, when the extent of the holocaust was known, he criticized Jews who had tried to escape or fight for their lives as they did in Warsaw and Treblinka. “The Jews should have offered themselves to the butcher’s knife,” he said. “They should have thrown themselves into the sea from cliffs.” “Collective suicide,” he told his biographer, “would have been heroism.”

Source: Instapundit.com -

But then, there is this!

At the beginning of the Second World War he demanded independence as India's price for helping Britain during the war.

Source: BBC News | World | The life and death of Mahatma Gandhi

So, what if British had agreed to Gandhi's price? I bet when he meant India will help Britain during the war, he was not merely talking about moral support.

Wouldn't his actions (or offer of action) be more relevant here? After all, the question was not what Gandhi would have said but what he would have done!

March 10, 2007

Learning Haskell

I stumbled onto Haskell around 2 months back while searching for resources on spreadsheet programming.

I wanted to do Buy vs Rent calculations before deciding to buy a house. Microsoft Excel is pretty good. However, after a while it simply did not scale up. You cannot define your own functions and there are no local variables available. It has been my experience that learning in the context of real problem is much faster and easier. This time, it launched my exploration of functional programming. Enter Haskell.

Haskell is a pure functional programming language. Transition from imperative programming to functional programming (and too a pure one) was very difficult. But slowly, I got the hang of it. I re-did Buy vs Rent calculations in Haskell (it's not complete yet).

To explore Haskell further, I decided to implement a small subset of GNU Make features in Haskell. Within a few days (1 day of "thinking" and reading, followed by a day of coding), I was able to get a working system (see make.hs). To use it, simply call 'make' function, passing it a list of rules and a target:

make [(makeCCRule "test")] "test.o"

Simple, C compilation and linking rules are included. But you can define your own rules (a tuple of dependencies, target and list of commands to run when the target is out of date with its dependencies). Haskell allows you to focus on your application logic without causing undue distractions of memory management, maintaining state or even declaring types (it provides type inferencing). It is amazing how much you can do in less than 90 lines of Haskell code (including comments and empty lines). 

I haven't tested it thoroughly and there is no error handling. The system is easy to extend with your own "definition" of what it means to have a target out of date with its dependencies. With a little bit of refactoring it won't be that hard to support pattern like rules (.c to .o, etc.). Please send me feedback on how to improve this (I would love more modularity using type classes, for example).

March 08, 2007

Minsky and Housing Bubble

Dr. Hyman Minsky's explanation of boom and boost in a capitalist economy is based on structure (or rather change of) of financial relationships. It is highly relevant today as it describes what is happening with the housing sector. The practice of ARMs and various option mortgages are nothing but Ponzi finance schemes.

“In order to understand why our economy has behaved differently since the middle of 1960s than it has earlier in the post-World War II epoch we have to appreciate how the broad contours of the financial structure have changed. The changes in the broad contours of demand have changed the reaction of aggregate profits to a change in investment and therefore have changed the cyclical behavior of the ability of business to validate its debts. The changes in the financial structure have increased the proportion of speculative and Ponzi finance in the total financial structure and therefore increased the vulnerability of the financial system to refinancing and debt validating crises.”

“A thorough research study should examine the changing composition of the assets and liabilities of the various sectors and the implications of this changing structure, as well as changes in financing terms, for the cash flows of the various sectors of the economy. The cash flow structure due to liabilities need then be integrated with the cash flow from assets and the various cash flows due to income production. In particular the changing relations between cash receipts and payment obligations and between payment obligations and the margin of safety need be understood.” (page 49)

The combined effects of big government as a demander of goods and services, as a generator – through its deficits – of business profits and as a provider to financial markets of high-grade default-free liabilities when there is a reversion from private debt means that big government is a three way stabilizer in our economy and that the very process of stabilizing the economy sets the stage for a subsequent bout of accelerating inflation.” (page 56)

“Innovations in financial practices are a feature of our economy, especially when things go well… But each new instrument and expanded use of old instruments increases the amount of financing that is available and which can be used for financing activity and taking positions in inherited assets. Increased availability of finance bids up the prices of assets relative to the prices of current output, and this leads to increases in investment… In our economy it is useful to distinguish between hedge and speculative finance. Hedge finance takes place when the cash flows from operations are expected to be large enough to meet the payment commitments on debts. Speculative finance takes place when the cash flows from operations are not expected to be large enough to meet payment commitments, even though the present value of expected cash receipts is greater than the present value of payment commitments.” (page 66)

“During a period of successful functioning of the economy, private debts and speculative practices are validated.  However, whereas units that engage in hedge finance depend only upon the normal functioning of factor and product markets, unit which engage in speculative finance also depend upon the normal functioning of financial markets. In particular, speculative units must continuously refinance their positions. Higher interest rates will raise their costs of money even as the returns on assets may not increase…

In addition to hedge and speculative finance there is Ponzi finance – a situation in which cash payments commitments on debt are met by increasing the amount of debt outstandingPonzi financing units cannot carry on too longFeedbacks from revealed financial weakness of some units affect the willingness of bankers and business to debt finance a wide variety of organizations… Quite suddenly a panic can develop as pressure to lower debt ratios increases.” (page 67)

Source: Credit Bubble Bulletin, by Doug Noland of Prudent Bear.

Subscribe




  • Subscribe to my RSS feed

  • Enter your Email


    Preview |

Tip Jar



  • Amazon Honor System Click Here to Pay Learn More

Ashish's shared items in Google Reader

Search


  • Google

  • Search Now:
    Amazon Logo

BookShelf - Recently Read

Recent Posts

Recent Comments

September 2007

Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            
Powered by TypePad