Steve and Barry's closing out

If you look carefully, you'll see a "Store Closing" banner on the left, and a "New Styles Arriving" banner on the right. They're the same store, mind you!

Java and Scientific Computing

Lately, I've been using Java for something I never imagined I would: Running time bound simulations and collecting statistics. This started from an Advanced AI homework, which required us to evaluate different strategies for solving the 8 Puzzle.

Depth First and Breadth First search -- the most brute force of them all -- are real processor hogs. They take a good amount of time to get through solutions. I set up my simulations to try 8 puzzle combinations in groups. Each group had members which were an equal number of moves away from the solution. I'll call this the "distance" of a group from the solution. I started looking at groups with distances 1 through 10. The idea was to see how depth first search scaled with distance, while using multiple boards to average out the time (since boards were randomly generated). The simulation started out fine, but somewhere half way through, Java ran out of heap space causing me to lose half an hour worth of simulations. Terrific. So I fixed the heap space with a JVM switch to allocate 768 M. This time, Java didn't seem to die on space, but for some reason, started halting randomly. Here's a section of the simulation output. The first column is the distance of the board and the second is the run time in microseconds.

4 4.265305
4 0.399163

4 8058.812957

4 0.495941

4 4.762955

Now, the simulation is set up, to repeat a given run 5 times, to average out run times. So, the same board configuration is run 5 times for a given algorithm. The numbers above are the run times of the same algorithm on the same damn board! What gives!? A 4 microsecond difference is probably justifiable, but a full 8000 microseconds?

Now, I'm not sure if Java / the JVM is entirely to blame for such random spikes. In order to validate that, I'd have to rewrite this simulation in C++ and post similar numbers. Somehow, I doubt that the deviation in run times will not be this high. As of now, I'm treating this as an open problem. I'm certainly not assigning blame to Java, but its definitely complicit!

More to come.

[And no, there were no other CPU hogging processes running on the box at simulation run time. Certainly none that would cause such spikes.]

Are you a wanna-be Buffet?

Buy low, Sell high.

a.k.a Buy now.

Open Letter to the United States House of Representatives, 110th Congress, 2nd Session

My Dearest Representatives of the people of the United States of America,

I write to you, in regards to the post-noon session of the House Floor on September 29, 2008. On vote, was a 110-page bill, titled "LEGISLATIVE PROPOSAL FOR TREASURY AUTHORITY TO PURCHASE MORTGAGE-RELATED ASSETS". As you will doubtless recall, the formulation of said bill, was a culmination of seemingly bipartisan action over the weekend preceeding said date, at the White House, the offices of senior Democratic and Republican Senators, the campaigns of Presidential hopefuls, Senators Barack Obama and John McCain and the studios of leading television news channels. Official Statements and press leaks confirmed to the nation and the world at large, that a deal had been brokered and that salvation to Wall Street's woes was nigh. The country slept the last night of the weekend in the firm belief that its elected and chosen representatives had found a solution to the economy's woes. The solution supposedy had protections in place to protect the tax payers and impose punitive actions upon those responsible for this debacle. The bill in question was scheduled to be passed, providing relief for the millions whose 401 K and IRA accounts were in dire straits, to those who were in danger of being evicted from their homes upon foreclosure, to those whose life savings (in the form of shares and derivatives) were being eroded by constant bank failures and clockwork stock market crashes.

However, events on the morning of the 29th transpired rather differently. The bill in question was debated on the floor of the house, as it should be. House Speaker Nancy Pelosi's speech, tagged as partisan some Republicans cast a looming shadow of doubt over the rest of the proceedings. The call to vote was finally made and the voting process led to a shell shocking defeat of the bill 228-205. As is the case with any such incident in the House, the blame game duly started, led by House Republicans, followed by comments from House Democrats.

The bickering throughout the day, by members of both parties only serves to rub salt in the wounds of the people affected. House Republicans alleged that Speaker Pelosi's speech was partisan and caused them to vote against the bill rather than for it. Other House Republicans allege that they alerted the Democrats that they did not have sufficient numbers, but did nothing otherwise to stop it from going to vote. In the midst of such finger pointing, the Dow Jones Industrial Average and the Standard & Poor's 500 Index -- which have been pointed to us time and again as a sign of the economy's weakness and an argument for the bailout -- crumbled.

Representatives of the People, I put it to you, that you have failed the very people you were elected to represent. By placing party politics and partisan bickering above the will and need of the people, you have engaged in deceitful and malfeasant behavior. Your actions on this day, reflect an utter lack of governing will, total collapse of any form of leadership and a breakdown of the system of checks and balances.

Notice, that I do not argue for or against the bill. Your individual decisions to support the bill or vote against it, should reflect the opinions of your constituents. Not your party diktat. By choosing to devolve yourself and your constituents, to the colors of Red or Blue, you have chosen to divide the people. The Great Bipartisan Sham of 2008. Your choices and votes on the floor of the House are required, by law, by the oath you took to be a direct representation of the people you claim to represent. This choice, cannot include objects as squalid as your ego nor your power nor your party affiliation. Your votes today reek of corruption of the worst kind.

As you are doubtless aware, your approval ratings are hovering around 15%. I would certainly be interested in investing which 15% of the country approves of your bickering. Perhaps its the crowd that mistakes C-SPAN for Comedy Central. Such performances as today, do not serve to improve your ratings.

Representatives, this crisis is an economic crisis. Not a partisan one. Your indecision and callousness has already cost millions of Americans their futures and their children's futures. You are complicit in the very crimes you accuse Wall Street of.

Representatives, your choices are fairly clear. You need to evolve a consensus on this issue promptly. You need to exhibit an appropriate level of leadership and put a final decision on this bill. The consensus can be in either direction, as long as it is meaningful and is the best available option for the people of this great country. Either that, or you will face the wrath of the people in due course. You are elected officials and you are going to seek re-election in the time to come. The memory of the people may be fickle, but days such as these are firmly burned in the minds of those affected.

To simplify your decision making process, I offer you a quote from the 3rd President of the United States, President Thomas Jefferson

I believe that banking institutions are more dangerous to our liberties than standing armies. If the American people ever allow private banks to control the issue of their currency, first by inflation, then by deflation, the banks and corporations that will grow up around [the banks] will deprive the people of all property until their children wake-up homeless on the continent their fathers conquered. The issuing power should be taken from the banks and restored to the people, to whom it properly belongs.

This statement, issued in 1802, to the Secretary of the Treasury, has more foresight and more wisdom than is evident from any of your statements over the period of our current

To conclude, I implore each one of you personally, to put aside your partisan issues and political bickering and constructively contribute to the solution of one of the greatest economic disasters of modern times.

With regards,
Srichand Pendyala

Cubaholics Anonymous

Lately, I've been involved with a 3 dimensional species of puzzle that involves moving square shaped tiles around. Also known in technical parlance as "The Rubik's Cube". Up, down, right, away and right inverse goes my head. My fingers accordingly flex, extend, adduct, abduct and rarely circumduct (If you didn't understand those terms, go look up a kinesiology book (no I'm not a kinesiology major (and no, I do not like Lisp))). Such motion is usually accompanied by the creaking sounds of my aging cube.

Recently however, said creaking sounds have been replaced by their more intellectually acoustic cousins, called "speech".

"Hey, look at that guy. Think he's he okay?"
"You think he's gesturing at me?"
"Oh gosh, the poor fellow must be suffering from one of those diseases I heard about on TV!"
"You keep doing that son and next time, even if you have a cube with you, I'll give you a ticket." [1]

Yes, I am now a victim of Imaginary Cubesolveritis. To cut a long story short, if my fingers aren't already solving a cube, scribbling equations on a sheet of paper, typing away at a keyboard or stuffing food down my throat, then they're restlessly trying to solve an imaginary cube.

Its almost as though the urge to twist and turn faces and slices in a cube, is a wholly natural and evolutionary response to huge stacks of work lying right in front of me. The larger my pending work gets, the more I want to solve the cube. Till now, the only levee that deterred me from expending large swathes of time on the cube, was the fact that I did needed the cube to work on it.

This Saturday however, disaster struck this little home in Houghton, MI. The levee broke, releasing large amounts of solution attempts at my fingers. Who would have known? Katrina, Gustav, Ike and then ... Rubik. Tragedy I tell you, Tragedy.

... to be continued.

[1] The comment therein, is a result of a wholly unfortunate interaction between me, an imaginary cube, my car, a police officer and a stop sign (in that order) late Sunday night.
Note to self: Never take the stop sign overly seriously again. Not serious enough to wait a little more than a minute anyway.


... I should just continue blogging here? Yes, all previous attempts of mine to work on my own blog scripts have been a terrific disaster. I hardly ever remember any of them leaving pre-alpha stages even.

Just perhaps.