Saturday, November 03, 2007

Goodbye Blogger!!

After being tired of the nasty 'onKeyPress', today I finally pulled the plug on blogger. Now I am moving my blog to Wordpress

Checkout oltsm.wordpress.com

Friday, November 02, 2007

Unlocking the value for shareholders

Unlocking the value for shareholders

Floomferg Fews Dated 03rd November 2007.

Reliance Energy is planning to separate Infrastructure projects as a separate company to 'unlock the value for shareholders', who are not already satisfied with the value, which is quoting at 40 times TTM earnings. Infact, unidentified sources close to Anil Ambani have said there are plans in the pipeline to 'unlock the value for shareholders' in several of the companies under the ADA group umbrella.

It was not confirmed, but people familier say -

Reliance Capital will separate its business into Insurance and non-insurance to unlock the value for shareholders.

Reliance Capital may further consider to separate its Insurance business into General Insurance and Life Insurance to unlock the value for shareholders.

However, this is not sufficient to unlock the value of its shareholders, hence it has plans to separate its Life Insurance business into 26 companies. Yes that is right - 26. Each of these companies will cater for people having initials starting from Letters A to Z. However, it remains to be decided whether first name of a person will be considered or his family name.

Company has further 'plans to unlock value for its shareholders' by splitting each of these 26 companies further into 22 companies, where each company will serve roughly the same area as is served by reliance communications, the Telecom arm of the group.

To 'unlock the value for shareholders' of Reliance Communications and other company Reliance Natural Resources Limited (which is quoting at merely 500 times its TTM earnings) every Insuree of Reliance Capital will get a free telephone connections from Reliance Communications subject to availability of spectrum and On Tap gas supply from Reliance Natural Resources Limited.

It is however being speculated that the Registrar of Companies does not have enough hard disk space on its servers to store the paper work required to register so many companies. Thus 'unlocking of shareholders value' may hold roadblocks if the RoC does not upgrade its infrastructure quickly.

ADA officials declined to comment on the 'market speculations'.


Investors responded positively to the news. Shares of Reliance energy rose 4.62 percent. Shares of Reliance Natural Resources rose 13 percent. However the same optimism was not seen in the shares of Reliance Communications whose shares were down three-fourth of a percent where the 50 percent benchmark index is up by 1.7 percent. Shares of Reliance Capital also posted a modest increas of three fourth of a percent.

Sunday, October 28, 2007

Fighting the PANTA Trip Murphy. - RC 1

I have previously spoken at length about honourable Mr. Murphy. Here, I am going to deal with our endeavour to fight the Murhpy that was haunting our trip plans for a while now. A bit of a background - First time Mr. Murhpy hit us on the face was last year when we'd decided to go to "वासोटा" for a trek. pilot, was then called for a late night last minute duty and we'd to drop the idea. Next time Mr. Murphy hit us was when we'd almost finalized the plan for an overnight trip to 'तारकर्ली', when Bayani was suddenly diagnosed with a tumor. Thankfully, it turned out to be benign one hence no Mr. Murphy there.

Inspite of such lost battles, we had continued planning for the next trip. This time one was an overnight to 'कशिद' beach, and then people started dropping down like Indian Cricket team wickets. Initially, we started with eight and were down to five. But still five and we'd decided, never mind we are going to go ahead with the plan. And then, and then Bayani calls me on the previous night saying one of the five had met a small accident!!! We were deliberating about possible choices and a few came up (of course dropping the whole idea of trip was one of them). But one thing just put me off - Bayani said we'd start at 10.30am next day. I said, nothing doing we are going to the trip as planned, which was by the way trimmed down to a single day trip to मुळशी and then to लोणावळा. If Mr. Murphy has to meet us, let him do that at मुळशी not here.

So fighting these odds - We started finally on Saturday morning. Absolutely nothing eventful for the good part of the trip initially, when we started testing our luck, initially with Diesel in the car. While there was 'enough' diesel in the car, we were certainly stretching it a bit. Then we reached a point where the closest Petrol Pump that we knew was 30kms away. Which was not all that intimidating (Interesting dialogue - Bayani - माणगाव is 37 KM. Unmesh - पाली is 36 KM. Bayani - What is a big deal about 1km? Unmesh - When you've to push the car for that much, you'd know!) So finally getting down from the ताम्हिणी घाट, we asked the local shopkeeper about the nearest Petrol Pump. He suggested, there was one at भिरा (That is where Tata Power Company has a power plant. We decided to take a lunch in the canteen there, but shunted right at the gate by the dutiful 'Security') Looking at the state of the Petrol Pump, I asked the guy atleast three times - 'Are you sure this is diesel?' Surprisingly, he wasn't annoyed. But so far so good.

Initially the 'plan' was to go to लोणावळा via मुळशी - लोणावळा Road, which is about 50 odd kilometers just from the beginning of the ताम्हिणी घाट. So dutifully we came back to a place where we wanted to start from, taking a detour of 30km for filling the freaking fuel, never mind! Bayani suggested a place where we get 'excellent कांदा भजी' and it was already 1.30pm in the afty and we decided to get some fuel for ourselves and then go ahead. After going about 10km in that direction, we realized that it was a bit too far to be trying that, hence we decided to take an about turn and head towards our planned venture. 20km detour for nothing in particular.

The road from मुळशी to लोणावळा is 'treacherous' to say the least and the guy who actually put a sign board indicating that this road goes to Lonavala must be a sadist of the first grade. This one was certainly one of the less travelled types!! First kilometer was 'uneventful' apart from thick forest we were in and I was reasonably scared at 1.30pm in the noon to be outside the comfort of the car. After taking a small break and a bit of photoshoot, we decided to move on. A kilometer and half further, we saw a curious railing and a nice flat space and broken beer bottles suggested this place was visited by a few atleast. It was a consensus to halt there and take a peek. That decision was worth it! The splendid scenary out there was ammmaaazinnngggg (pun intended), cannot be described in words! Curious of such wonderful sights in store, we decided to move on.. Next couple of kilometers were rather bland, nothing spectacular happening. In the meanwhile, we were a bit surprised about how Mr. Murphy was still so silent, it was quite unlike Mr. Murhpy. Then going further we came across to a bus stop called 'Luthra Van Bus Stop', and crossed a bridge. If one regrets crossing a few bridges in life, it was certainly one of them, a stretch of next 4-5 kilometers was tasting. There was nothing 'resembling' a road, everything was just stones laid with no particular intention in mind. It didn't strike us till then we'd not seen a single vehicle in either direction, hence may be 'one was not supposed to go this path', and in the middle of that stretch of 5 kilometers, we were counting every single meter of the 52000 we'd to cross to reach our destination. I was certain, Mr. Murphy has saved everything for the end-game. Crossing a couple of kilometers, we decided, the best bet was to move on. For the first time, in my life, I was actually believing 'An unknown friend is better than a known enemy'. Unknown friend here being 'The Road Ahead' and known enemy was the 'The Road So Far". Honestly we had no choice, the only thing that was left to us was pray and move on. There were atleast 20 occassions, where we believed this road is never going to lead to Lonavala or we're lost somewhere. If I ever wanted to know what 'Himalayan Car Rally' is all about, this was certainly a trailor to that. A couple of times I'd to ask the junta to get down, so that the freaking car could climb the 40 degree slope with no chance of getting a grip on the road and everything that can go wrong could go wrong there! Finally we came to a point where I had lost almost all hopes of reaching Lonavala, or for that matter reaching any place where human civilization existed. We did come across a few humans along the way, but none suggested us that, only a fool is going to go by this road, or probably they were too nice to call us fools. For the benefit of those who know Crooked Street in San Francisco, Just imagine that without a tar and a slope 5 degrees too steep and yes a few stones here and there. And finally, after a trecherous four or five kilometers we reached a point of 'No More please' and I came across a guy, asking him "How much more?" He said just a bit more. I had heard that answer twice or thrice before, so wasn't really sure how long 'just a bit' is. Meanwhile, people who were asked to get down of the car joined and we got into the car, and guess what, in less than fifty meters, that was over! This does not mean we were out of the woods, well literally!! But there was atleast no 'visible damage done'. We still had to go good forty kilometers and we started our countdown. What was remarkable was while all of this was happening, no one not a single one of us pressed the Panic Button (of course there were no usual suspects who'd, still..). A few kilometers further, we started seeing some cars in opposite dirction. I even saw a 'मंदीर' and I suggested 'मंदीर is a positive thing' and everyone burst into a laughter. (I am not sure whether it was for my saying it or for thorough hopelessness with which we were going on!) and continuing in that fashion an hour or so later, we reached a place called 'अंबवणे', yes that is where the famous 'Amby Valley' is. Mr Murphy not in action yet! Oh and yes all this while, there was not a single drop of drinking water with us!

The road from Amby Valley to lonavala is a perfect anti-climax to what we'd gone through just now, if one has to experience hell and heaven separated by one hour and few kilometers, we'd done just that. It was just a smooth ride from there to Lonavala to Kamat hotel for some snacks. Finally, we dropped the idea of going to Sunset Point for it was already past 6pm and there was no Sun left to set. Thus we began our return journey to Pune, nothing much to write about!

In a span of less than 6 hours, we'd driven on every possible road one can see in India, save the one that goes along the beach. A village path, a state highway (which is barely 4 meters wide), a national highway and finally the Mumbai-Pune Expressway the best road in India.

And when we finally reached Pune and stopped for the customary chai, we'd defeated Mr. Murphy of PANTA Trip atleast for now! (A feeling tantamount to defeating Australia in any form of game)

Next release of this will have a picturesque version. Tough luck for those who missed this, well I can say that now!! I wouldn't dare saying it 32 hours back!!!!

Demystifying the 'India Story' - Part 1

I am personally a great believer in Technical analysis. The trouble with Technical Analysis though is that, it gives a Sell signal sometimes when it is too late. Especially in times of 'Parabolic Frolic'. Hence for whatever it is worth, I decided to look at the fundamentals of the India Inc. today. I was mainly concentrating on the Major Sensex companies, to see whether,
my notional belief of market being expensive is really true or is it just my misinterpretation that market is expensive. To my surprise, some interesting facts came out.

I was basically concentrating on the following parameters for Benchmark - EPS for Trailing Twelve Months (this is one real indicator), EPS Growth QoQ and EPS growth YoY (This shows how the company is performing in past twelve months and is likely to perform in next 3-4 months. Just an indicator). (Price/EPS) will eventually give the much talked about P/E ratio.

Looking at these numbers - Some interesting facts came out. I am just noticing the sailent features

1. Reliance is quoting at 29.1 times its EPS for TTM and YoY and QoQ growth is 41.0% and 17.0%.
2. ONGC is quoting at just 15 timees its EPS
3. Bharti and RCom are quoting at 40.0 and 53 times their EPS, but this is for quarter ended june. Interestingly their QoQ growths are 10 and 22 percent respectively.
4. L&T is quoting at 62 times its earnings and its YoY and QoQ EPS growth is Negative. Yes Negative!!!!
5. ICICI Bank is quoting at just 20 times its earnings and its YoY and QoQ growth is 6 & 5 percent.
6. HDFC Bank is quoting at 38 times its earnings and its YoY and QoQ growth is 8% and 25% only.
7. I have not completed others yet, will do those when their September earnings are out and revisit Bharti and RCom.
8. Reliance capital is quoting at 50 times its EPS, when its QoQ growth is negative, yes negative, but YoY growth is definitely positive.
9. Quick look at RNRL, it is quoting at 276 times its earnings.
10. The IT stocks are 'still' quoting at about 25 times their earnings. However, it should be noted that 'save Reliance' these are the only stocks that are giving both QoQ and YoY positive performance for past 3-4 quarters (albeit smaller).

Looking at these numbers, it is evident that the 'value' of the stocks is certainly going ahead of whatever these stocks are worth. Contrary to popular belief that our market is quoting at 20 P/E, we are quoting well above that, almost similar to Nasdaq 1999-2000, pre bust valuations.

Most notable are the so called 'Winning Horses' or the Capital Goods and the Power companies (details in Part 2)

I don't know when the day of reckoning arrives, but when it arrives, we are going to see a whole lot of sinners then.

While, I have only focussed on the QoQ and YoY numbers, I have not taken a closer look at some 'interesting' parameters like 'Other Income'. If these 'parameters' are accounted for, we are certainly overvalued even more, even assuming a twenty percent premium for 'Emerging Market' story, one can easily expect where the stocks are headed, once the judgement day arrives.

After taking a look at this - I have decided to trim down some of my Axis Bank and may be Suzlon. (I have very miniscule, but a bird in hand is better than two in the bush.) I have decided to take money out of my MFs (over a week). There may be a 10-20 percent upside, but the downside risk is too much to be playing with.

A request to SEBI - I believe SEBI should make it mandatory to report EPS numbers, for investors to be aware of real performance of the shares. Otherwise in the clamour of beating the street, ordinary investors are never made aware of the 'bare basic facts'.

I have used data on stockhive for my reference. It is a very good site for the investors looking for good solid information about the company they want to invest in.

PS: I have no idea why someone would want to bid for a 20 percent (yes that is percent) out of money 4500 puts? Taking a clue, it might be worth trying that stunt!

Disclaimer: The ideas expressed are purely personal and a result of my own studies, they do not constitute 'Investment Advise' in any way.

Wednesday, October 24, 2007

Who runs our country?

Just something that came to my mind -

We have got a prime minister - Who goes ahead and signs a nuke deal and when push comes to shove, somersaults to say - "It is not end of life if this deal doesn't go through...." and then whines and cries and says "Allies didn't support nuclear deal..." and says he's 'embarrassed'. Actually Mr. honourable PM, we are embarrassed to have you as a prime minister. When was the last time we heard a prominent leader saying he's embarrassed, perhaps one should give some credit to the man for being honest, but there is something called dignity and our dear PM does not seem to have it.

We have got an agriculture minister - Who is when not watching a cricket match at some place on the earth, is busy acquiring farmer's lands for SEZs and cricket grounds. Who not only stops at that, but goes ahead and actually asks farmers that they should stop farming and do some other business and then in a typical politician style somersault - clarifies 'He intended to say that atleast one in the family should be doing a business other than agriculture." Are you asking the farmers to be Pitch Curators or Groundsmen? I am afraid, we've too much supply of them to be holding those jobs.

We have a finance minister - Whose official job it seems is that of a Capital Markets commentator. I guess you'd do better than Udayan Mukherjee? CNBC TV18 listening??? In his passtime, he like meddling with SEBI's affairs and making pre-emptive comments about stuff he's no business speaking at all and then 'clarifies' what he meant.

We have an external affairs minister - Whose primary job is to manage 'internal affairs'. When he's not passifying his next door neighbours in his home town Kolkata, I am not really sure what he's doing.

We have a chairperson of UPA - Who apparantly has no constitutional role, but generally is treated at par or sometimes above the head of the Government, ie. PM. Which I don't have too much crib about, still isn't that odd?

But isn't it true afterall, people 'deserve' the government they get? Don't americans 'deserve' a George Bush or a Hillary Clinton?

Sunday, October 21, 2007

Mr. Honorable Finance Minister....

After the recent p-note issue, BJP came up with an interesting idea of having a JPC enquiry of it. I have no idea what BJP's intention behind it is - which of course is politically motivated, but the way they are reacting is rather childish. However, thinking a bit further on this issue - Though BJP is wrong in its rationale the spirit isn't quite wrong. Having thought a bit more about it, even I have a few questions to our Honourable Finance Minister. Here's my list Mr. Chidambaram -

0. Is it part of your duty to make comments about Stock Markets or even for that matter 'Forex Markets' did you forget 'Bond Markets' by any chance?

1. Mr. Honourable Finance Minister (HFM) is SEBI not supposed to be an Independent Regulator outside the scope of broader politics? If then, why did you react to the SEBI's recent 'draft proposal' on P-Note indicating that it is a part of broader 'capital control' in view of the receint 'copious' inflows, while SEBI says it is primarily worried about the anonymity associated with P-Notes? Or should we assume that it falls within the broader spectrum of your duties as an FM to interfere with the day to day operations of 'independent regulators'? Should we just assume that your interference is limited to SEBI and to some extent RBI or are there any other regulators that we should be aware of?

2. Mr HFM, I remember you going on the records on a television channel asking the reporters - "Please do your homework, check who is buying on the NSE and BSE now? Some of the prominent FIIs are buying now. I don't want to take names, but you do your homework...." Does this mean that it is not unreasonable to assume that - as a part of priviledge of you being FM, you are aware of the 'actions' of certain market participants, the knowledge of which is not available to an ordinary investor like us? Is it not fair to assume that "Such knowledge can be potentially used in a manner that can be financially beneficial to you as an individual?" Is it not abuse of the priviledge you have? Or is it true that you are so naive that you forgot that you should not be atleast 'publicly speaking about it'?

3. Was LIC asked by someone prominent which is you Mr. HFM to buy on Wednesday? If that is true, I think your stomping is not limited to 'independent regulators'. Are there any other names that we should be aware of?

4. In view of this, should you be trusted with nation's money at all?


I am really surprised - not a single journalist (they are more like VJs) asked any of these questions to our honorable finance minister. Infact, I was even more surprised, some of the eminent editors at channels like CNBC, believed it is part of FM's duty to interfere with stock markets. One of them went to the extent " If I were a finance Minister today, I would ....." This is disturbing or should I say disgusting?

Friday, October 19, 2007

October 19th

Today is the twentieth anniversary of the Black Monday (when the Dow Jones Index collapsed 22.6% in a day.) Taking this occassion and the recent happenings in the Indian Markets, here is my take -

There is a lot of cry about "P-Notes" and its effects and everyone is crying blood how the proposed actions are affecting the stock markets and how investors are loosing their money. We'd get to that point quickly but here are a few questions which no one ever asked when the stock market was going up... -

1. How does uncle Ben's interest rate cut affect the so called "India Growth story" that the stock markets should go to dizzying heights?

My Answer: IT does - Sentiment: After Uncle Ben bailed out wall street after the recent credit crunch in August, Gorillas ( big guys at the Wall street and their clients - Hedge Funds oh sorry obscene Leverage Funds) start believing that they can do pretty much anything and will eventually be bailed out by the Fed, so lets start stomping some fields. Unfortunately after the Dotcom bust and the housing bust there is nothing left in the US markets to chase, what next? Emerging Markets - they also have a story about them. So here they come - with billions of dollars stashed in their pockets ready for the party.

2. Did everyone forget what happened before dotcom bust? (This is not the end of the world yet! don't worry, we are probably going to see another rally, but mostly a sane one.)

3. Is anyone trying to tell me that the "concerned parties" were not aware of the impending "draft proposal" about the P-Notes? O come on I am not a kid anymore. Most of them would have received a 'pre-draft version' of the 'draft-proposal' in advance.

4. So why did the Crash then recovery and then to new heights and then down again?
Imagine yourself being a gorilla - When the markets goes down (as happened on Wednesday) with practically zero trade, I don't get a chance to get my billions out of it. Most of my money is underwater (except the shorts that I have been buying right left and center). So here are possible scenarios to what happened on Wednesday

#1 - Some gorilla got left out of the party and somehow an entry had to be created for him to enter the party. What better ways than a Downside Circuit gap open, everyone is shit scared, and slowly let him in.

#2 - After the crash - Someone was asked by honourable Finance Minister to start buying so that the public doesnt loose faith in India story and in our government. We've already had enough with the nuke-puke.

#3 - Gorilla saw the cops coming to the party (after getting the 'pre-draft' version of the 'draft proposal')- so how do they get out of the party? Ok let some monkeys in (you and me) and then booze them, drug them, let them start partying and we'd go one by one, so when the cops come we are out!

What happened in last two days is most likely to be #3. Or to be really really alert - It is probably made to believe to be #3. (They'd eventually want their part of the pie, so why buy it expensive.) My recent take is #3 + caveats. Remember these guys only care about money - and next time they'd be smarter, will party a little less obviously.

By the way my #2 was also not way off the mark, LIC was indeed buying on Wednesday as reported by Economic Times. (Don't buy Unit Linked Insurance Plans) don't invest your money if someone is picking up a gorilla's litter.

Now someone would actually say - I am vomitting venom because I was caught on the wrong side. To be honest - I was caught on the right side (luckily - no claims to smartness), and I actually made some money.

And guess what while all of this is happening - The global markets have started getting some hiccups. The only indicator of stock markets that I learnt matters is - Yen-dollar (once there is a strength in yen, see markets coming down and vice versa.)

How does it look from here - A downside of 10% is not ruled out and another 10% possible. There might be another rally to 5500 nifty levels (if that fails and we go down from there, I think we are heading for something worse! (Sell ALL mutual funds then!).. that scenario atleast looks unlikely for now! There's enough money to be made in India story yet by gorillas)

Now I have also started learning a lot and given up my short side infatuation!!

This is markets for you... Watch out Monday (could be a nasty one!)

Few last remarks -

Whether P-Note should be banned or what? I really don't understand these mechanisms. My take is - In a free market economy no one should interfere on either side, don't do this by cutting interest rates or suddenly pulling plugs on certain means of investments (if they are wrong, they should not be there in the first place).

Thankfully we have some really really good regulators who will do their best to avoid a Thailand (1997) happening to us!

Disclaimer:
No claims to smartness. Purely personal opinions could be wrong in every possible way!!

PS:
When I read about investors loosing few lakh crores of their wealth, I was thinking what exactly is "wealth?" Honestly, I am still thinking about this and yet to get any meaningful answers.

PPS: Google, while you are making record profits (I wonder how - More about that some other day), will you care to fix this nasty onKeyPress in blogger, it renders typing impossible.... Or may be time has come to pull the plug on blogger.

Tuesday, October 09, 2007

Eighteen and on

On 18th September Ben Blew the whistle for the "Beta Treasure Hunt" and it still continues, with some finding huge treasures along the way. So sensex yesterday reached 18000 and all of us have a reason to cheer.

Lets look at what really happened - After the Fed cut the rate, there was new wave of liquidity that was chasing high Beta. One saw it in US markets, in emerging Asian markets and popular Beta stocks in the US markets viz. Google, Apple, RIMM (This is what minyanville says not me!). But in last week or so we have started seeing a divergence in this beta, what it means is they are not all moving up in sync, these are definitely first signs of caution.

But, but but rallies like this typically end not on the basis of technical indicators or valuations, they end with structural imbalances manifesting into something awry. From what little I know, I think they are getting there and it is just a guess, I don't have any claims to smartnesss, but we are seeing something really really soon, maybe within a week. I could be as wrong or right as anybody and certainly don't claim to be smart.

Atleast now I have started hearing words like "End of Bull Market" from eminent fund managers, so the current mad rush is to get the maximum buck for your bucks.

Having said so - I would say continue to party, as long as it goes on, but don't be a minute long than you should. One would have no place to hide!!

Wednesday, October 03, 2007

Toooooooo Mucccccchhhhhhh

The only other time I remember laughing as much as today was after reading "Almost Everything about Flowerpots" from one of P G Wodehouse's novels, or may be not.

This is the best piece of humour, sarcasm I have read in last so many years, if ever in my life.

So here it is Kevin Depew of minyanville on Five Things you need to know for today on minyanville tonight!!

Sunday, September 30, 2007

Sunday Evening ........

I stumbled upon a couple of rather interesting urls over last few days, though completely un-correlated, they have a common theme.

Here's one about chuck norris and the global credit crunch


and here's one about Paul Graham and Life Universe and Everything.

Monday, September 24, 2007

supwerbowl of cricket (update 2)

Hoooooooosh! It's over in as dramatic style it gets, the sigh of releif comes because India managed to reach home. But what a match it was an absolute stunner of a game!! This is the third occassion I remember, where I thank God for giving me eyes to watch the spectacle in front of my eyes!!! The last two were our Test win at Adelaide and the wimbledon 2007 final.

This format of limited overs cricket has been quite a revealation in more than one ways! It's excitement crunched into less than half the number of overs. Traditionally cricket has been a game of batsmen but the Grand Finale to the T-20 worldcup proved, it's the ballers who still call the shots!! Apart from that there have been a few revealations for the Indian cricket. For starters, it proves that a unit that plays as a unit wins and you don't really need superstars! (well this as well could have been a setup and the conspiracy theorist in me still believe so.), but still a world cup victory is a world cup victory Setup or otherwise!

Some interesting finds have been, the way Dhoni has lead the team establishing an authority, showing faith in young guns (Dravid would not have dared in his life to put Yusuf Pathan as opener, anyways he's a poor captain spare him for this good day!), then givign ball to Joginder Sharma, playing a big gamble twice in a row, remember it could have gone either way! But thats what they say in Poker, you can only loose what you've got on the table, but if you don't play, you can't possibly win much more.

The fielding has been of pretty decent standard. Uthapa's direct hit to get rid of Imran Nazir came just at the right time. Importantly, the bowlers are bowling within the stumps! You miss, I hit! and not to forget one of the biggest finds of this tourname Rohit Sharma. He's a cool customer.

It would be unfair not to give due credit to the splendid display of calculated risk taking by Misbah, but he was just a little short in the end! Never mind well played man!!

This does not mean Indian cricket is out of the woods, but today is the day to celebrate man!! Only if our board and selectors learn that "There is talent and thus an opportunity, only if you think beyond the obvious!"

Well played team India!! Many congratulations! and well played pakis too! Tough luck!!!

Sunday, September 23, 2007

Monday the 24th - Superbowl of Cricket

It's Superbowl of Cricket!!!

A couple of weeks ago, when the twenty-twenty world cup started and if someone were to pick the winner, or even guess the finalists, I guess a lot of names would have come to the fore, barring the two who are making it to the final.

I for once have stayed away from Cricket for a while, but this format is best format of the cricket after test matches. It's the excitement of 50 overs squeezed into 20 overs and there's everything that a cricket fan enjoys. Balls going out of the park, stumps going off the ground, stunning catches, ubelievable run outs and deluge of runs! Though I must admit, this format is a bit harsh if you are a bowler, but traditionally Cricket has been batsmans' game.

Surprisingly, the young Indian team is playing some "good solid cricket". The way India defeated aussies yesterday (I still feel a touch sad when aussies loose, even if India defeats them.) in a knockout match, pressure cooker situation, certainly means the momentum is with India, but pakis are playing a good game too.

It is BIG, World Cup final and it's India Vs. Pakistan!!! It's the superbowl of Cricket!!!

Saturday, September 22, 2007

By the way

I was amazed to find out that my ssh session was intact after a reboot following "hibernate" in ubuntu!! Too damn good!

Friday, September 21, 2007

All this was nine years ago?

I have heard about LTCM so often, that I decided to check out what it is...Incidently today happen's to be the ninth anniversary of LTCM's debacle. :-)

Here is a detailed chronology of what happened at LTCM. Honestly I didnt understand the details of LTCMs strategy and what caused the screw up.

I have been following the finance news quite closely off-late and some of the causes of debacle of LTCM, and those of hedge funds like Golden Alpha or Bear Sterns are strikingly similar.
- Complex Mathematical Models.
- Heavy Leverage
- Atleast one unhedged risk going wrong.

Why is it not that we learn lessons from events just nine years away? Or is it that no one wants to learn the lessons at all, for they know, if I screw up, I am going to be bailed out.

For my friends who undertand sed. just do s/LTCM/"Golden Alpha" and s/Russian GKO/American Subprime

and everything else is same

Tuesday, September 18, 2007

How Bernanke has (potentially) screwed me!

Yesterday, I was toying with the idea - What if Bernanke does a Paul Volker? I was a bit too optimistic about this I guess (I am still short on Nifty). Apart from that there is a reason why I can be potentially screwed by Bernanke's pyrotechniques yesterday.

Recently, I have got a project where I am going to get payment in US dollars(or pesso), by the time I get my payment, the dollar might be a good couple of rupees below the current price and I stand to loose a decent amount of money. I guess, subsequently, it makes sense to quote in Euros.

PS: Out of curiosity, I was watching the Defty( which is the Nifty in dollars) YTD, while the Nifty is just 12% up YTD, Defty is up 23%. I guess, it won't be long before we hear words like Dollar Carry Trade.

Monday, September 17, 2007

Hedge funds or Leverage funds?

One of the best examples of the word misnomer is "Hedge Fund". Hedge funds are about everything but hedge. Bloomberg recently reported blowup by the so called "quant" hedge funds in August (again). One Goldman's Golden Alpha fund - Which bet for the Yen carry trade and lost 22.5% in august. Interestingly, Japanese housewives, a group becoming prominent forex traders also lost money in the month of August thanks to carry trade (where they were Yen short an Australian Dollar long.), which means the complex mathematical models employed by Goldman's alpha fund are not much different than those employed by Japanese Housewives, who are without the luxury of enormous amount of computing power at their disposal. This is not to demean Mrs. wattanabe, but the point here is - There is no "complex mathematical model". Most of the Hedge funds lost an average of 1.6% in August while the S&P gained 1.5% in the same month. Hence if some of those hedgefunds had actually "hedged" their speculations against S&P a lot of their losses will be "contained".

Mish's weblog has got a few interesting posts to read about it.

This is plain simple speculation amplified by leverage. So what should the name be? Golden Alpha Obscene Leverage Fund?

Saturday, September 15, 2007

Tata Indicom and the art of Incompetence (update 2)

After being horrified with Tata Indicom's customer service, attached is an update to a mail sent to the folks. I received two "mail undeliverable errors", while these are the adresses picked up from their website. Looks like I will have to start a blog dedicated to incompetence of Tata Indicom.


Attached is the mail in original...

Remember this is the website of the second largest conglomerate in India and the webmaster address is not reachable. Can one imagine the impression an external guy is going to have? Ditto for the corporate.Affairs email address for a company website.

-----------------
This is an automatically generated Delivery Status Notification.

Unable to deliver message to the following recipients, because the message was forwarded more than the maximum allowed times. This could indicate a mail loop.

webmaster@tata.com




"This communication (including any accompanying documents / attachments) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. If you are not the intended recipient, you are notified that any dissemination and/or copying of this e-mail is Strictly prohibited and you are requested to delete this e-mail immediatelyCommunicating through e-mail is not secure and capable of interception & delays. Any one communicating with Tata Companies by e-mail accepts the risks involved and their consequences. While this e-mail has been checked for all known viruses,the addressee should also scan for viruses and notify the originator or e-mail beshroff@tata.com. Thank you for your co-operation."

Final-Recipient: rfc822;webmaster@tata.com
Action: failed
Status: 4.4.6


---------- Forwarded message ----------
From: "Abhijit Gadgil"
To: suroor.hussain@tatatel.co.in
Date: Sat, 15 Sep 2007 17:17:38 +0530
Subject: Fwd: Horrible Customer Care Experience (TTML)
Dear Mr. Hussain,

Being a customer and shareholder of your company, I believe I have a
right to ask few questions about the nature of operations of the
company. A reply from you may help me decide whether I should continue
being both or neither. I am afraid, my current inclination points to
later, based upon the recent exchange with your company regarding a
Samsung Duo phone. This is going to be my final attempt at banging my
head against the wall (probably, I am just an optimist, that you'd
improve, or a downright fool.)

Here is the detailed story -

Recently, I have seen the advertisement for Samsung Duo phone in News
paper and looking at the specifications was inclined to buy that
phone. The details of that experience are narrated in the mail
attached below, if you care please read that. I fail to understand
some very basic things.

1. If the handset comes with two slots for SIM cards, and ther is a
slot for a CDMA SIM card, why I cannot use my current prepaid SIM card
with the handset?

2. What if I really buy a new connection, but of course "being still
somewhat sane, inspite of being your customer", I would like to retain
my number and are you saying thats not possible? Or in other words -
"Well you were idiot enough to trust with us before - Tough luck
mate!"

3. I understand, there are various pricing mdoels, that come out of
creative(?) minds, which implies certain offers are packed in a
specific manner. Does it mean, you are going to loose some of the
customers for good because of those models. As a shareholder, I
believe I have a right to ask that question.

4. The competence of customer service is abysmal (I can not think of
any other word!). See below for a detailed discussion.

It is unfortunate that the quality of service is somewhat
questionable, which is a serious disturbing fact for me both as a
customer and shareholder, especially from a trusted brand like Tatas'.

The only good thing about you being you are not crooks. So ultimately,
I am left to decide between somewhat competent crooks and absolutely
incompetent but not crooks. If the "care for customer" is so pathetic,
I'd bite the bitter pill in that case.

If you care to look into some of these questions and answer me, I'd be
greatful.

Thanks

-abhijit
-----------------------------

Friday, September 14, 2007

Tata Indicom and the art of Incompetence....

This is the letter I sent to their divisional headish guys, not sure whether this whill help....

-----------------------------
Dear Ms. Navaz Karanjia and Mr. Shailesh Nandanwar,

Here is one interesting tale about the quality (or lack of it!) in
your customer service. Of course, I don't expect to receive a reply
from you. Thats your style (I mean your estimed company's.)

After checking the recent advertisement for Samsung Duo phone in the
newspaper (Times of India, Pune, Dated 13th September 2007), I had
called the customer care number mentioned in the advertisement to
request for a new "handset". Which by the way comes with a SIM card,
but still one has to take a connection with it, while I already have
one. So far so good, I don't mind taking a new connection as well.

Now I receive following calls - In that Order

1. From "A department" asking me whether I had applied for new
connection? I said NO. I had requested for new Handset and the guy
told me that one has to take a new connection.

2. Another call (now, I am surprised a bit, that your company actually
followed up a call, never mind.) asking me - Do you want a new Mobile
Connection. I had to re-iterate again. No I want a new Handset.

I am not too sure why is it so hard to jot down the following as a
Customer Request and why this cannot go to right department, in the
first attempt or atleast second or atleast third? "Mr. So and So has
requested for a new Samsung Duo phone, please follow up, this is the
number."

Yours is a company, unique in incompetence, where a customer is
himself asking for a business and you don't have the right people to
deliver the basic service. It is unfortunate the level of service (I
am afraid, I can't think of a better or worse word for this) is
associated with a trusted brand like Tata's, but never mind when you
hire morons, you can't expect to do a half decent job of anything.

Hoping that you'd atleast read this email.

Regards

-abhijit
--------------------

Saturday, September 08, 2007

Possible Orkut bug?

I have been busy cleaning my mailbox etc. when I discovered an Interesting bug in Orkut. Attached is the Image. There is not a single scrap in my scrapbook and yet it shows 7 scraps. Not sure. How? I was thinking may be it was also counting messages in my Inbox. Well that doesn't tally either!! :-(



There are other things that I encounterd as well. eg. When the number of Scrap Entries in the dropdown list was 10, it was showing only three scraps on the page.

I guess, it will serve a lot more to fix these bugs than changing "css". The new "css" is bad btw!

Oh and puhleeezzzz puhleeez fix the naasty onKeyPress in blogger. The letters appear on your screen as if one is doing a Telnet to a server on Mars.

Wednesday, September 05, 2007

And this is not a setup?

Suman, once asked me "Is there anything you believe at all?" My answer was "Well not till I can independently verify it!". I had told him why Shwarzeneger became a big success in US (he comes from an iron curtain country, and what better way to show to the world, in the days of Cold War that America is a land of opportunities), why you started seeing bruce lee films around mid eighties (that was the time when there was a heavy American investment in China) and so on the list is endless.

Coming back to the topic of the day "India Vs. England Match". Well these days I am so engrossed following stock markets around the world (which are also setup btw, but the only good thing being there is a chance for me to make money there. More about this later), that I hardly follow cricket. But I watch the score once or twice. So when we switched on TV after returning from our shop, India required 42 runs of 25 balls. I calmly told my dad don't worry we'd win this match. It is setup to be like that. I guess after the much celebrated "test series win" the script of the Natwest series was written in advance 1-0, 1-1, 2-1, 3-1, 3-2, 3-3, 4-3 England winning it. So there was not much of doubt in my mind about the outcome of today's match. Well that doesn't mean you give final over to a part-time bowler when each of the regular bowlers have one over to spare. Never mind. So while a lot of people were jubiliant after watching India win, I was just smiling to myself for being proved right. This does not mean, we could not have lost the match, but certainly not in final over. And the way we won it was suspicious enough. With three balls to spare, you don't bring long-off in and bowl a half volley.I really felt sorry for having spent countless number of hours watching the game before. Wish I could learn these things beforehand.

Friday, August 24, 2007

On Nuke Deal

I generally don't like commies, but I guess, in India they definitely serve a purpose. To curtail the blatant hedonism of likes of Congress and BJP both. The recent noise about "left" threatening the government has made everyone express his or her opinion. Me too! :-)

First, truth be told, I don't know a word about what is there in the nuclear deal or "123". The only "123" that I know about is a song from the movie "तेज़ाब". However the rush with which PM Manmohan Singh has acted on the deal begs few question.

- For a deal as serious as this was there a "parliament approval"? Did US president sign the deal without Congress approval? Why did our PM sign the deal without "parliament approval"? and if the deal is signed and say implemented without parliament approval, will it be binding on the subsequent government (as and when it is formed)?

- History tells us that US never works in the interest of anyone but themselves. So the question that we should ask is - What exactly are those interests and how much detrimental are those?

Coming back to nuclear power plants or energy generation in India. Why the government does not come up with real numbers as to what is the shortage of electricity today? How the nuclear power plants are going to help fill that gap? What is the economics of nuclear energy vis-a-vis fossil fuel powered and other non-conventional like Wind powered? What are the hazards? What are the efforts taken to ensure that there is no collateral damage? Answering these questions will make the case really stronger (if the government indeed has one), otherwise this opens possibilities for a consipracy theory that sees under the veil Bofors like kickbacks.

Personally I don't think we should be building huge Megawatt power plants, but instead focus on few 10s of MW captive power plants connected with a grid. (I am not an expert), but looking at the population distribution and energy usage distribution, I guess it is far more economical in the long run to build captive power plants, with a distributed ownership.

Saturday, August 18, 2007

एक अप्रतिम विचार

... विकसित देशांमधल्या "तज्ज्ञां"चा तांत्रिक सल्ला हा विकसनशील देशांच्या गरजा वा प्रत्यक्श परिस्थितीशी निगडीत नसून त्यांच्या स्वतःच्या देशाच्या आर्थिक हितसंबंधांशी जोडलेला असतो हा आणखी एक मौलीक परंतु अतिशय दुर्दैवी धडा मला मिळाला....

डॉ. व्हर्गीस कुरीयन

On Indian Stock Market....

My opinion about how the things are going to pan out -

A very short term picture
-------------------------
I think we have completed the first leg of the correction after the recent top of 4600 and there is a likelyhood of a rally to upto 4300 on nifty. I am thinking of buying a couple of 4100 calls if I get them under 120 or I'd just buy one. Square that off when nifty reaches 4300 or when Reliance reaches 1825 or when premium reaches 200 and stop loss at 80 or when nifty falls below 4100 (yesterdays closing.) even intra day. 4300ish looks a decent resistance level right now, with three indicators 50% of the drop between 4600 and 4000. Resistance from the descending trendline connecting recent tops and 50 day EMA. So that will be a good place to get out of long position and do fence sitting. most likely it'd hover around that level. If it starts correcting from there, we've formed a good head and shoulders reversal pattern that should take us to 3650 levels on nifty. If 4300 resistance is overcome, there are chances we'd go all the way upto previous High of 4600 and then that becomes a double top reversal and the downside is somewhat the same 3600ish slightly more. There is a reason why market should go up from here. There is about 5 billion dollars of FII money trapped and the market is roughly where it was before this rally started (nifty 4100ish), so the money needs to get out and we need a rally for that and yesterday's Fed rate cut have provided the right sentiment for this. I'll be watching daily FII activities in cash segments, if the pattern of withdrawals remains constant, it implies that money is leaving. By the time we reach 4300 levels if there is a net inflow of atleast 500M$,it might imply that we'd go past the previous high and then the double top formation doesn't hold and there is a possibility of a bigger rally taking nifty upto 4800ish levels. (In my humble opinion I don't see a reason why that should happen, especially looking at the 'repricing of the risk' sentiment, but I have a right to be wrong! ;-) )

Bigger Picture
--------------


On a bigger picture, on a weekly chart (see above), we are running very close to the big trendline that started from 2003 bottom (start of bull market) and connecting all the intermediate bottoms. So looking at that, we need a bigger sustained rally for the bull market to remain intact and that needs money. So I was looking at FII inflows starting from 2003 the year when bull market started. 2003 had net FII inflows of roughly 6.5B dollars, 2004 had net FII inflows of 8.5B, 2005 had net FII inflows of 10B, 2006 had a net FII inflows of 8.5B and by today net FII inflow in 2007 is roughly 9B. Remember, as we go to higher levels, we need more dough to keep the rally, so looking at the arithmetic progression, we need somewhere close to another 5-6B $ net FII inflows in the coming months. That is not impossible, but again looking at 'repricing of risk', this looks a tad difficult. In short, we are running out of breath for the bull run, unless there's an energy drink (Red Bull) coming from somewhere.

I have been assuming in this discussion that the bull market will only continue if there is enough FII flows. However the past tells us that, the whole bull market is fed by the FII money, so the assumption is not entirely incorrect.

Regardless of whether the bull market remains or not, I am going to be playing week by week.

Disclaimer: The opinions are completely personal and should not be taken as investment advise in any way. Investments should be made solely on the basis of personal risk appetite and investment objectives.

Credits:

1. The chart is taken from icharts.in
2. FII inflow figures are taken from SEBI website.
3. Technical analysis by vivek patil on ICICI direct.

Tuesday, August 14, 2007

cheap patriotism

Often, we use words with little care, however behind that unscrupulous use of words, there is an underlying emotion (or mental picture so to say..) that says a lot. eg. We always hear "India's Freedom Struggle" and "American War of Independence". I'd like to point to somewhat subtle yet very obvious negative connotation associated with words "struggle" as opposed to "war", "struggle" is a defensive effort, where as "war" conveys agression, confidence. Similarly for "freedom" and "independence". "Independence" implies a self belief, confidence where as "freedom" looks parallel to be freed from the prison say. It is a tad too pessimistic to be speaking of such things on the occassion of 60th Independence Day. But off late I have started getting peeved off on the occassion of the "national festivals" and associated display of "cheap patriotism".

Coming back to what I call "cheap patriotism", it is far easier to shout slogans of "वन्दे मातरम्‌" and "जय हिन्द" etc. but isn't that really cheap, cheap as in cost associated with it and the value it delivers. It takes no efforts to shout a few slogans, so there is actually no cost associated with it and ditto for value (the slogans don't feed the hungry next door neighbour, the slogans don't patchup the pot holes on the road, the slogans don't generate energy, the slogans don't give the deserving child an opportunity to learn and explore). But it takes efforts to build roads, supply electricity and making sure every child gets a free and compulsory primary education. There is a cost and value to it, but alas it also requires, application, commitment and enormous amount of hard work and no wonder why everyone is so apathetic about it.

Honestly, very very honestly I am not proud about India. Come on, it takes heart and complete lack of common sense to be proud of the roads on which we drive, the electricity which we use, the education that we get and the perpetual incompetence that we have to deal with while receiving any "service". Or you want me to be proud of our newly elected "president"?. Honestly I don't have the heart and not yet completely devoid of common sense.

Never mind, I am one of those doom mongerers who never see a positive side in anything. No I don't believe in the "great India Story", ofcourse I must admit there are pockets of greatness still there (eg. Amul, Baba Amte, Dr. Swaminathan), but miniscule compared to the juggernaut of incompetence, mediocracy and lack of values.

Okay finally let me join the bandwagon of cheap patriotism "जय हिन्द!!"

etcetra...

Humour "finance news style" -

I have been reading a slew of finance news off-late. Here are some interesting picks from those.

Credit Crunch in second life as well?

This story on minyanville reports some interesting anecdote about a credit crunch in second life, as if the one in first life is not good enough.

Another cool picture from an article in minyanville.



If one's not still satiated go and read bloomberg for any of the announcements made by Goldman Sachs about their "quant funds". There is more fun out there than you'd find in a Disney cartoon.


Now something about a Toy Story

Mattel has withdrawn 13.4 million chinese made toys from the market, which had more lead paint than permitted by regulation. So where are those toys going to get dumped? You right the dumping yard of Uncle Sam, India. Isn't this a reason why uncle Sam is so hard pressed about the Nuke deal? Where'd you dump the nuclear waste otherwise?

PS:
Why does blogger have a nasty "onKeyPress" that renders my typing to a near halt?

Thursday, August 09, 2007

Do you know?

The counter yahoo uses on its finance site for the NYSE stock volumes is a 32 bit one? It wraps around after a four billion plus volume. I am going to watch it wrap around tonite, before I go to sleep........

and for those who didn't believe me - here is the screen-shot

Before Wrap up




After wrap up


a quick link

Here is something I came across,on bloomberg.com. It's about some fake pfizer drugs being sold in India.

Here is the link

Thought may be I should spread the word!

Wednesday, August 08, 2007

who's the boss out here?

Amazing video I stumbled upon while reading something.

Friday, August 03, 2007

Nifty this week 30th July - 3rd August

Highlights of the week for the NSE ...

NIFTY
- shedded almost a percent at 4401 end of the week.
- Weekly charts for the past 18 months shows a small downtrend starting last week with a bearish engulfing candle.2 year weekly chart shows there is a good support around 4180 levels on the weekly basis.
- YTD daily sharts shows we are in a short term down trend with resistance around 4450 (20EMA), 4500 (trend line starting the beginning of this rally in April) and resistance around 4370 (50 EMA),
- Should trade between these ranges, breaching of any of these levels on higher volumes will indicate the subsequent direction. Though the outlook is certainly bearish.

BANK Nifty -
- Up almost 150 points (though on lower volumes.)
- Bank nifty is in weekly downtrend with a huge bearish engulfing candle last week.
- Weekly resistance is around 6900 levels (looking at 18 months weekly trendline.)
- A very good support at 6600 (50 day EMA.) and a weak support at 6820 (20 ema)
- Should trade between 6600 to 6900. Crossing of any of these levels on higher volumes will indicate subsequent direction. The tone is still bearish.

Reliance -
- Down almost 65 Rs. for the week.
- A strong weekly support at 1750 level (trend line for the last two years and 50 EMA.)
- A weak resistance at 1825 and a strong support at 1800 levels (trendline starting last july.)
- On a daily chart shows downtrend last week. (with lower volumes on up days and higher volumes on down days.)
- A little bearish, this stock is going to be pivotal in the coming week especially owing to very high weightage in the nifty.

IT stocks -
- Took a beating last week. Nothing much to write about.

State Bank -
- Up almost 135 Rs. on good volumes on weekly charts.
- Shows a strong support around 1550 mark from the daily trend line and 20EMA.
- Resistance around 1650ish.
- This looks strong, unless it takes a beating with others.

In short the next week will pan out depending upon how SBI and Reliance perform. SBI needs to maintain its rally and reliance needs to take a support at 1800 levels.

Global cues indicate weak markets in the coming week. The mild recovery Europe posted early this week was washed out yesterday. Asia is not significantly recovering and S&P500 closing below its 200 EMA indicate a nervousness in the global markets.

Disclaimer: The stocks/indices discussed here are a personal opinion and for informational purposes only. This should not be taken as investment advise in any way. Investments should be done based upon personal opinion and risk appetite.

Credits: All the charts mentioned are taken from icharts.in

Tuesday, July 31, 2007

Random Thoughts....

Justice at last...

I often fail to understand the Indian audience. There is this guy who's accused of holding a 'kaleshnikov' goes around the world teaching 'गांधीगिरी' and guess what he's a big hit. It seems no one gave our 'मुन्ना' a toy gun when he was a kid, so when he became 'भाई' he got ihim self a kaleshnikov instead. You know those unfulfilled dreams of childhood. Finally there is justice though. I know this is going to be symbolic and doesn't mean much, but it still a blow in the face of crazy audience... There is going to be a supreme court appeal and if in the worst case Mr. Dutt goes to jail, it's going to be nothing beyond change in address.


Good Job Mr. Y V Reddy

Reserve Bank yesterday increased the CRR by 50 basis points, almost "unexpectedly", squeezing away 150bn rupees in liquidity. This was a great job by Mr. Y V Reddy, who walks his talk. This shows Mr. Y V Reddy is more "concerned about economy than stockmarkets". Great job sir!!


Smiles on the face....

It would have taken a heart to go short yesterday evening. Something told me I should and guess what I did.. The logic (ok it is easier to explain stuff when it proves right.) but here's the logic. Yesterdays rally towards the end resembled something. (see the chart below, taken from icharts.in ). It told me, if there was a chance of going short it was today and if I was wrong, doesn't matter, cover it up with a stop loss at 4550. They say in minyanville , if you are disciplined, you can pretty much do anything. Discipline is the key.. that is the lesson that I have learnt in my short and 'not so much to write home about' trading history.

Oh well and while I finish this markets might have rallied past the dip, but thats market for you!!



Anyone interested in reading charts about Indian stocck markets, icharts.in is your answer. it is really really very neat. It's not yet my dream charting software, but closest to being useful..


Disclaimer: The stuff discussed here about the stocks is a personal opinion and should not be treated as an investment advise in any way. Investments should be done solely on the personal opinion and risk appetite.

Sunday, July 29, 2007

wordsilearnt.com is up now

A bit of an announcement. I was working part time on an application called "wordsilearnt.com". It is finally up and in a usable state now.

It's basically a simple application, which allows one to save and share the words they learn. I used to come across several new words and didn't do anything about them. Thought this would be a nice useful application and in hindsight I was not wrong! ;-). Or to give it a web 2.0ish name, it is a "social vocabulary building" application. Sounds sexy right? ;-)

I am planning to add a few features in the coming days.

For those who are on facebook, if you like the app, please add this application, so that I can get 5 users and then can submit it to Facebook directory. Here is the application URL on facebook if one wants to add it.

http://www.facebook.com/apps/application.php?id=2397064823

Enjoy!!

Monday, July 23, 2007

website screen capture in ruby - HowTo

For one of the projects that I am working on, I needed a website capture utility, that will dump output into a png file. I couldn't find any one-stop-shop for getting it done. There are many websites that have this service (see references towards the end in the post), however I needed something where I have access to the source code, so that I could tweak it to my needs Also something in ruby was prefereable, so that I can integrate it with other stuff I am working on. Google, google and google and finally I hit upon an implementation in ruby called moz-snapshooter.rb, which has got a good screen capture facility that uses 'gtkmozembed' , which is an embeddable Gecko rendering widget that GTK applications can embed. This was pretty much it. All that was needed was the ruby binding for gnome2 libraries etc. They can be found here.

So here is the final deal (on ubuntu Dapper) -

1. Get the ruby-gnome2-all package from here

2. Get the firefox-dev package using apt-get. (Note this is required for building the gtkmozembed.)

3. Get the moz-snapshooter.rb

4. Edit it to your needs

5. Fire ruby moz-snapshooter.rb

Most of the things just work out of the box.

Now comes a little tricky part. All of this requires an X server running. So what if one wants to run it on a headless X server? The answer is Xvfb (which is a virtual frame buffer based X server.) Continuing further.

6. Install Xvfb using apt-get.

7. Finally run the 'ruby moz-snapshooter.rb' inside 'xvfb-run' as follows
xvfb-run -s "-screen 800x600x16" ruby moz-snapshooter.rb

Note to pass -s "-screen 800x600x16" option, since most of the websites work well in that resolution.

Caveats:

1. The libgtk-mozembed-ruby package that comes for 'ubuntu' uses the gtkembed.so library provided by mozilla 1.7.X (which is not compiled with pango renderer. It is better to use firefox-dev library and hence build by hand the ruby-gnome2-all package.)

2. The final output resolution image should be of smaller resolution than the one passed to xvfb-run.

3. This is not 'perfect' yet, but a good starting point.

Here are some samples.

1. Google in 150x100 resolution -



2. paahijen.com in 320x200 resolution -



3. Marathi wikipedia in 640x480 resolution -




References :

1. A pygtk implementation by Andrew McCall
2. moz-snapshooter.rb by Mirko Maischberger
3. Ideum screenshot capture prototype

Friday, July 20, 2007

Best sumanism Ever

Suman has got talent for almost everything. He's one of the smartest coder I have seen. He's a very good singer, a good artist, can cycle for 50kms. I don't know of a thing, which suman can't do, I mean can't do well. But I guess his best talent, is for writing. I'd definitely make a blog dedicated to sumanisms. but this is the best sumanism ever.

"Wikipedia is google in O(1)"

Just too good. !!!

Thursday, July 19, 2007

just can't seem to get it?

Anybody following the stockmarkets for the past couple of weeks should get puzzled and have shorted it (like me), should get frustrated!! The things just aren't falling in place, but it doesn't matter, the markets are rallying and thats it.

- starting July 2 Indian stock market has rallied by 5 and a half percent.
- In this rally there have been all but two days of decline (which had a 0.25 and 0.43 percent decline.
- If we go back a little, in last month the markets have rallied by almost 10 percent (common is this Shanghai or something?)
- Not a single day of more than half a percent decline in 20 trading sessions, the highest decline is 0.46 percent.)

And all of this comes when
- most of the global markets have shown some intermediate corrections, but bulls at the Dalal street seem to be unfazed by that. Only possible exception is wall-street, which did have a hiccup or two but thats it nothing beyond that. Yeah all of this when a little over billion dollar gotten wiped out in the Bear Sterns Hedge fund, which is just the tip of the subprime iceberg. The dollar is at its weakest against Euro and pound.

- When the crude price is hovering around $75 per barrel

- When we have two successive weeks of increase in inflations. (up by almost .25 percent from its low.)

- When during the days for which I have observed, FIIs though buying in cash segments, have been in net short positions in Stocks futures and Index futures to the tune of 2000 Cr. rupees (not to mention tons of 4400 and 4300 nifty puts, which are going to go down the drain, I suppose)

- When none of the quarterly earnings being spectacular per say. (Infy disappointing, TCS goodish, HDFC okayish, Wipro poor. Only real surprise came from L&T (The stock has appreciated little over 30% already) and Ranbaxy.

- Now all of this is fairly risky, but no one knows where to find a top? The rally resembles almost a panick rally (I agree it is oxymoronic) Usually such situations arise while finding a bottom.

This looks like "someone is printing free cash" to go ahead and buy stock, the question is who? Carry Trade?

The answer just isn't there, or I can't seem to get it...... :-((

Tuesday, July 17, 2007

Context Sensitive Ads?

Let me start with a question -

How is Bra Selection in India is related to developing PHP apps with UML and which in turn is related to brass hardware and all of this is related to Pushposters? Confused, check the following....





The best one is the one at the top! I guess they figure out sex of the email viewer from the email address (or possibly its registered somewhere!)

PS: The image is edited a bit.

Saturday, July 14, 2007

A date with XUL

While working on a firefox extension for a feature on paahijen, I had a loong date with XUL. XUL (pronounced as zool, is an XML based User Interface Language). More stuff about xul can be found at XUL - MDC or XUL planet

Basically, I needed a form where I could copy something to clipboard from a document loaded from a HTTP URL. The problem was, I couldn't use the simple Javascript based methods, as access to clipboard is restricted inside mozilla. So I had to have a XUL window with a XUL button and contents loaded from the URL.

One option is to do all the UI in XUL and use XHR for talking HTTP. So I started with XUL UI. If you thought CSS is a bitch, try XUL and you'd almost fall in love with CSS. In short, for someone short on patience, looking for a quick solution, laying out a XUL UI is not an option. Looking for alternatives, I found an interesting alternative in the tutorial on xulplanet, which uses iframes instead. In my opinion, this is a better approach, unless there is a specific need for Client only UI. First, it is simple, and second you don't need to learn a lot of XULgiri.

So the final solution was a XUL window having a XUL button (on which oncommand was implemented to do clipboard copy) and the HTML document rendered in iframe.

One last issue is - to get contents inside an iframe. The solution is mentioned here.

Guess, thats it, rest of the stuff is quie straight forward.

Monday, July 09, 2007

Stay Hungry Stay Foolish

Steve Jobs Stanford Commencement Speech 2005.

Sunday, July 08, 2007

Scores Do Lie

There are days in your life when you thank God for being born as a human being, being gifted with eyes that can watch and being able to feel emotions. I remember one such day when India beat Australia in a test win at Adelaide and today was yet another day when I watched the two Champions play at the Centre court at Wimbledon. One of the champions have to win and it was the lucky one who won it eventually, but my champion for today is Rafael Nadal, the prince of Clay, nay, the prince of Tennis.

The match started with swiss holding the serve on love and looked like, O No!! we are here for yet another boring three setter, when mr. casual is going to sail through eventually and it just looked far more imminent when Nadal lost his serve on the second game and the Champion was up 3-0 and then we were presented with a quality of tennis that I have not seen in my life. Every challenge Mr. Federer had, Rafa had an answer and soon we were 6-6 Set number one. Tie breakers is Fedex's forte and looked like so when Nadal down from 6-3 was looking ominous to level 6-6, but the lucky fed managed to squirm throught the first set 7-6 (9-7).

Set number two started with Nadal serving first and from the trend I have seen, if you don't break Nadal in first nine games, you are going to loose the set and that is exactly what happened when Federer was broken in the tenth game. 6-4 second set Nadal. Match score 1-1.

Third set was like a boxing match when each player delivered their punches and it went to tie breaker, this time the swiss winning comfortably 7-3. Federer leads 2-1.

Thank God Federer started service in the fourth set and unless he lost the set with odd number of games in the set, he'd be the first to serve in the final, which gives a slight edge. Looks like Federer was in no mood to win the fourth set when a controversial "Hawk Eye" ruled a point in favour of Nadal and Federer was visibly peeved. To the 'naked eye' the ball really looked "OUT". Nadal completed the formalities of the fourth set with a double break and 6-2. Match state 2-2.

Federer serving in the final set. I couldn't hold my nerves and went away just to take a break from the tennis for a few minutes and when I returned I expected the scorelines to be 4-3 Nadal serving. To a kind of pleasant surprise, it was 2-5 Nadal serving. I knew the match was over. and it lasted a little less than five minutes after that when FedEx clinched his fifth title in a row.

The final scores (7-6, 4-6, 7-6, 2-6, 6-2). And these scores do lie, todays champion was Nadal. Federer has lost to Nadal a couple of times before, but it was his horrible play back then. Today Federer was not going to loose, he didn't seem interested in loosing today and played like he _had_ to win this match, but the darling of the crowd was 21 year old spaniard, whose agile court coverage, brilliant passing shots, made federer look like a
"normal" player. Nadal made federer run everywhere and made him win every single point that he had to, to win the championships... Ultimately Federer won, but my champion for today is Rafael Nadal and they say his style of play does not suit the grass courts, guess no one would dare say that after today.

The story of the match was captured in a couple of sentences in the post match interview when Roger said - "I said to Nadal at the nets 'You deserved to win today, I was just lucky one to win this!!'"

Well played both of you and thank you for such a marvellous display of high quality tennis.

मर्फ्यै तस्मै नमः

This post is dedicated to omnipresent Mr. Murphy.

Many of us are aware of Murhpy's law. For the uninitiated ones a bit of Wikipediagiri about murphy's law to start with. According to wikipedia, Murphy's law is formed with eight laws explain on the article. There is more about this over there..

Originally, I intended to write this blog in marathi, but some of the folks wont be able to understand it so writing it in english..

There is a proverb in संस्कृत (sanskrit), which says " कालाय तस्मै नमः ||" ("O times, I bow before thee!") . I think Mr Murphy deserves, nay, demands a similar reverence. Hence the saying "मर्फ्यै तस्मै नमः||" . A little bit of sanskrit grammer before we mover further. मर्फी is a "ईकारांत पुल्लिंगी" word like ॠषी, and we need a "चतुर्थी एकवचन" ( ज्याला नमन करायचे त्याची चतुर्थी). Hence the word मर्फ्यै!!

So how does Mr. Murphy proves that he exist? Answer - "In every possible way!". If you are going to give a presentation and the LCD does not like your Ubuntu laptop, it's Mr. Murphy in action. If you are standing at a signal when there is no chance of a shelter and it suddenly starts pouring, it's Mr. Murphy again. I will bet all my wealth (which isn't a lot), if I find a single soul who's not been affected by Mr. Murphy in one way or the other. Thank you Mr. Murphy..

Now a closer look at how much of a celebrity Mr. murphy was in our office. We had coined a special term for "getting murphied" called "मर्फी लागला" and Mr. murphy comes in a couple of sizes S (छोटा मर्फी) and L (मोठा मर्फी). The type of murhpy's explained above belong to the catagory of so called "छोटा मर्फी" (It might remind some of us about a brand of radio called Murphy and some of us might think of the small baby as छोटा मर्फी), where as मोठा मर्फी is when you move to bangalore and your home loan check bounces. Ask aditya about it.

Then there are some murphy people as well. Typically they exist in Cricket teams or all sort of team events, whose presence in a team makes the team vulnerable to Mr. Murphy's infection.

So what are your defences against Mr. Murphy? According to Aditya there are none. But there are chances of lesser harms, if you suffer from a couple of छोटा मर्फी's in a day, then probability of मोठा मर्फी affecting you is substantially (sorry somewhat) reduced. So pray for छोटा मर्फी.

To conclude, in due respect for such a great person "मर्फ्यै तस्मै नमः||" Long Live Mr. Murphy!

Saturday, July 07, 2007

Roger Puhlease

(photo taken from wimbledon.org original copyright ProSport/T. Hindley)

Play like you want to win this match and not like you just had a fight with your girlfriend and had nothing better to do and thought of playing tennis better than staying at home.... I know you'd win, still.

Just watched the match concluded bet Roger Federer and Richard Gasquet the Frenchman. The frenchman was a bit crippled in the third set, when Federer was 2 sets to 0 up, so it was a matter of time, till Mr. Federer the prudent swiss businessman, concluded his business on the Centre Court.

I am a great fan of Roger, but when you watch him play, it looks like he plays with a kind of laid back attitude and the worst part is he manages to win most of those matches. I often wonder what make him such a special player. Is it the odd Squash shot he plays, is it the back hand down the line return or is it is ability to win points at will? I just can't find the answers. Unfortunately to the misfortune of other players Roger has improved his serve so much and he serves almost Sampras like which make him much more formidable. In a couple of matches that I saw, I haven't seen him loosing more than 10 points in toto on his serve and when it goes to tie break, it lasts a few minutes.

The trouble with the way he plays is - With this kind of attitude, he's almost never going to win in Roland Garros, where the prince Rafael Nadal rules. It takes special skills, temperament and what the commentator at the end of the final this year said - "Federer needs to be a bit more like warrier to win against Nadal here".

I'd personally have loved to see Djokowic coming to final and every set going to a tie-break, unfortunately he had to drop out, thanks to the injury that's troubling him.

So the stage is set for the Federer - Nadal final at the wimbledon tomorrow, and I would really like Nadal to tease n test Roger, so that he's to raise his game a lot more.

Just out of curiosity, I'd really like to know the stats "How many five setters Roger has played in his career? And how many has he won?" May be I should write to Vijay and Alan (who are wonderful hosts for the tournament).

BarCamping at BarCampPune3

I had a wonderful day at BarCampPune3 today. Infact to be honest, I was a bit skeptical about whether most of the people who said they are coming will show up? And when we reached there, I thought my skepticism was just right, there were something like 23 and a quarter campers out there. But eventually people started joining and soon we were close to 100ish.. Well a lot of us showed up well after 10am the official starting point but eventually I guess, we were a couple of 100 or so, not bad. Barcamping to me was certainly new, but I kind of liked the geekish atmosphere there... (Did he mean 'Geeks', when he said 'Meeks shall inherit the earth?' hahan:-) ).

Something most interesting that I learnt by doing it.. Talking to an audience of 40-50 odd people with sort of diverse backgrounds. There were a few obvious pitfalls, which pilot pointed out. I had talked in front of 20 odd people before, and to be honest I felt pretty confident that I'd do a fine job, but from pilot's remarks, it appears it was kind of a mess. Neverthless important lessons learnt. So let me go over them one by one.

0. DO YOUR HOMEWORK. : What it includes? Atleast give a mock presentation to 2-3 people, plan your talk, your slides and DO NOT DO this at 1AM @ the midnight day before. Very very important.

0.5 Know your Audience: The best way to do this is by asking a couple of quick questions and checking out how much people know about the stuff you are going to talk. This is going to come in handy subsequently.

1. Set the expectations Right: It is very important to do so, when there is a sufficient amount of diversity, and it is obvious that you are not goint to please everyone, but still set their expectations right. Some ways to do this is go over an Overview of your presentations and mention briefly what you are going to cover.

2. Take a brief pause and plan for improvisations: Depending upon responses in 0.5 and 1.0 above, you've to plan a few improvisations. Of course the homework must be done for that. In general the improvisations will include, which topics to stress upon and pay attention to and which topics (slides) to skip. This also implies that you have the flow of slides well in your time.

4. Start presenting: Entertain questions but only at Logical milestones (and not after every slide..)

5. Whenever someone ask questions - Make it a point to "REPEAT the QUESTION", so that the audience knows what the question was and what your answer was refering to.. And answer to question should not look like a conversation bet you and the person from the audience who asked the question.

6. Whenever you've code snippets to explain stuff. They should be Pasted in the presentations. Doing (ALT-TAB) looks Ugly. Often relevant comments should also be included.

7. If you have a demo or something, plan it at the end or at the beginning, No ALT-TABs PLEASE.

One would obviously notice that I had missed on almost all the points above. Also, do not simply look at contents, while watching some interesting Google Videos, but look at How much the person is in Control of situation while presenting. The great skills of presentations lie in "Being in control"

Besides that, Mr Murphy was in control of procedeeings when needed and almost at will, when the Sleek Flat Screen Samsung Monitor Din't like my ubuntu desktop. ("मर्फ्यै तस्मै नमः||", a new phrase which I have coined. Will write in details about it subsquently) So much for the presentation. Coming back to the event... There were a couple of interesting talks that I attended, one of specific mention was about "Pros and cons of setting up your company in India vis-a-vis other options like US, UK or Singapore." This is not the exact title. But a very important point that came out of that, it probably makes sense to register a company in US than in India, if you are doing a startup.

We did a bit of advertising for paahijen as well. :-) It seems that a lot of people had actually seen what we were doing and thankfully none of them said "You Suck!" or were just being nice :-) ... (There was a bit of a goofup in the T we prepared on the 11th hour, which Akshay, noticed but guess not others! :-)

In all certainly a very enjoyable, eventful day! Look forward to more such things in the coming times....

Just before I conclude, a final reminder for me. "Do not assume people know the language you speak". eg. There was this journalist from the mint, namitha, who asked me... Where were you guys working before.. I told we were working at PANTA systems.. A High Performence Computing company.. To me "High Performance Computing" is as much a common word as say a "car", but she was like what does that mean? And I have seen this expressions a few times from others as well. The best answer I find for this is our company makes "Supercomputers like CDAC." Actually that sounds a bit sexy as well :-)

Tuesday, July 03, 2007

Wimbledon times...

I remember my school days when we used to almost religiously watch the men's and ladies' singles finals (those were the only matches telecast then on the good old DD). Those were the days when we saw the rise of Steffi Graf, beating Martina in 1988 final. 1988 was a kind of a dream year for a tennis fan like me when both my favorite players, Stefen Edberg and Stffi Graf won the championships.

After the Edberg-Becker era, there was a looong Sampras era and while it came to an end, I'd almost lost interest in the game, till I watched the 2004 final that saw the emergence of new era in Tennis, the Roger Federer era. I distinctly remember a small anecdot about it.. After the final Andy Roddick was asked "Andy you see to be enjoying this rivalry between yourself and Roger?" Andy - "To call this a rivalry, I'd have to start winning a few of those!".

This year though, wimbledon is cursed by the whimsical british summer, almost every single match is interrupted by rain and still we've managed to get to the fourth rounds well almost.. Unfortunately, I haven't watched a single Federer match. Hope I get to watch tomorrow against Perreira.

All the Grand slams are gruelling for the players, and each surface has a peculiarity of its own, but Wimbledon stands different. The meticulously maintained lush green courts, players wearing all white T's, the british idiocyncracies and the unforgettable "Thank you. Quiet please!". It's' all so very different... so very unique and so much enjoyable......

It's my dream to watch a Wimbledon final on the centre court one day and I hope to do so while Roger still rules the court!!!

Friday, June 29, 2007

महावितरण and the art of वितरण!!

महा in english means mega or big, and वितरण means distribution. Thus in short this is the name of the electricity distribution company that distributes electricity to the most industrialized state in India, महाराष्ट्र (maharaashtra), and I live in पुणे (pune) one of the top 10 metros in India. The availability of electricity is a random function. Not to mention, the fluctuations in the voltages, which take their vicitims every now and then. The voltage levels are not so random they range between 160 to 300 with mean being 230ish.

So here are few examples of one's experience with the art of वितरण.
- You read a nice blog by a friend, when you are about to write a comment and just at that moment, the laptop cribs "power disconnected!" and then you are like "O fuck!", and then you wait for a couple of minutes, 'cos you know the electricity is going to come back anytime, its just like waiting for a RockStar at a big concert, he can arrive anytime, next minute in a few minutes but certainly "today"...

- whenever clouds gather in the sky, you can bet all your wealth that the electricity is going to go anytime soon.. Infact a couple of times I have been "disappointed", when, inspite or heavy showers the electricity was intact for good twelve minutes..

- sometimes there is nothing happening in the sky, but lights go off and on a few times in a span of 20 minutes, I believe the guys out there are "testing", that they can indeed turn the electricity off at will, just in case...

- Then there is official loadshading, which is somewhat a random function as well, the only certain thing about it is, "It will happen!"

- If you ever visit, rural parts, its a fun indeed, there you'd find something called "आकडा" hanging on a wire, whereupon a lot of villagers solve the problem of "distribution" by "pulling" the electricity, of course, they can do so only for a couple of hours in a day... thats महावितरण's way of settling the scores..

PS : This blog post was written un-interruped, oh well almost!

Monday, June 25, 2007

A very interesting blog post..

Here is a link from the post, called bono I read on the blog by Marc Andreessen, yeah the famous netscape guy, whose welcome message most of us have seen when we installed our Netscape Communicator (which was the best mail reader then...). When I first read the title, I thought marc is going to take us through yet another web platform or something, but this is about the "evils of development aid to africa from the western countries.." I believe there is a lesson for India out there to be learnt too.. A really great post..

Offtopic: I have heard about this book "Everybody loves a good draught", I think I should pick this up from Crossword this weekend.Though, I doubt whether they'd have it...

interesting facts about my birthday

One of my friends happens to have a birthday on 21st june. It happens to be the longest day in the northern hemisphere. In marathi it is called "कर्कदिन", I was looking for a name in english, it eluded me somehow. I couldn't find.

Wikipedia is a great place, it has got a page for all the days in a year, so out of curiosity, I happened to check the facts about my birthday.

Some interesting facts that I learnt..

I share my birthday with Charles Chaplin and Lara dutta..


3000 years before I was born, Odyssus returned to Ithaca after the "Trojan War"

34 years before I was born, the psychedelic effects of LSD were discovered on my birthday. Not bad on that one! :-)

Unfortunately, this is the day on which virginia tech massacres took place in 2007. Bad :-((

Interestingly the term "Cold War" was coined by Bernand Baruch thirty years before I was born! :-) awesome!!

There are some other facts as well : like "Launch of Apollo 16", "Chicago bulls" record breaking 70th victory, "syria gained independence"

Wikipedia does not mention one thing though "Abhijit Gadgil" was born on this day !!! Too Baddd...

Quite an eventfull day so to speak! :-)

Monday, June 18, 2007

RA-captcha - An idea for ajax based captcha for rails applications.

While working on a new feature for paahijen-Scratchpad, we needed a captcha mechanism to keep the spam-bots out of the door! Since some of our users may not be quite comfortable with typing convoluted roman alphabets, we needed a different system. Honestly, I was too lazy to try out all the Rimage giri to get something useful and somehow wanted a mechanism, which is lightweight, easy to implement (lesser code, no new learning.. ;-) ). Somewhere, I had read about "arithmetic" captcha, and we decided to use it. We just hit upon an interesting idea... to use Ajax for captcha.. Hence the name RA-captcha (rails ajax captcha)..

The idea is fairly simple.. What it basically does is uses link_to_remote to update the contents of a "div" in the form dynamically with a text for a simple arithmetic equation. The equations is so simple that a 5th grade average student can do them without troubles.. eg. the equation will be something like "8 + 2 = " and then an input text box is provided to enter the value.. Though this technique uses "link_to_remote", it is not too hard to use other ajax methods for the rails as the need be!

Here is a simple code that explains the idea... The code is not perfect and I am not a rails expert, Also it doesn't do any validations than minimum.

Create an application "ajax-test" using rails ajax-test

We are going to add a controller called "main" controller and corresponding views. For this example we don't need any ActiveRecord models.

script/generate controller main



We are going to create the view for this controller and action "index". No layouts..
So create a directory called main inside app/controllers and edit the file
app/views/main/index.rhtml with following contents.




<%= javascript_include_tag "prototype", "effects" %>


<h4>
<%= link_to_remote ( "Click to open form!" , { :before => "Element.show('test-form');",
:url => { :action => "getequ" },
:update => "equdiv" }) %>

</h4>

<div id="test-form">
<%= start_form_tag({:action => "submit_test"}, {:id => "t_form"}) %>

<%= text_area_tag "userinput", nil, :size => "20x10" %>

<p><b>Humans? Please do some simple Math!
<div id="equdiv"> </div><input type="text" name="capval" size="2" />
</b>
</p>
<%= submit_tag "Go!" %>
<%= end_form_tag %>
</div>

<script>
Element.hide("test-form");
</script>



The controller code looks like this.....


class MainController < ApplicationController

def index
end

def getequ
numbers = (0..9).to_a

@equ = ''
num1 = numbers[rand(numbers.length - 1)]
num2 = numbers[rand(numbers.length - 1)]

session[:capsum] = num1 + num2

@equ << num1.to_s + " + " + num2.to_s + " = "
render(:inline => @equ, :layout => false)
end

def submit_test
if request.post?
if params[:capval].to_i == session[:capsum]
@userdata = params[:userinput]
flash[:notice] = "your input is accepted!!"
else
flash[:notice] = "Sorry you got the math wrong! can't accept your input!"
end
end
# reset the sum so one cannot simply press 'back' buttton and re-use it!!
session[:capsum] = -100

end

end


There is an additional view defined for submit_post. Which looks like this...


<% if flash[:notice] %>
<%= "<><b> #{flash[:notice]} </b> </p>" %>
<% end %>
<% if @userdata %>
<%= "You just entered -- #{@userdata}" %>
<p> <%= link_to "again", :action => "index" %>



<% else %>
No input data click <%= link_to "try again", :action => "index" %> to start.
<% end %>



How this works is fairly simple. Basically, whenever the first link is clicked an action in the controller called getequ is called, which generates the equation string for us and stores the value for the equation in the session[:capsum] variable. When the form is subimtted, the value of the text field is checked agains the value stored in the session[:capsum] variable. If the values match, the input is allowed, if they don't match the input is not allowed and the view for submit_test is rendered accordingly..

Since, the value the user has to input is only available upon loading the page and updating div, this value simply will never be known to spam-bot to be used without actually loading the page..

---------

The idea looked so simple to me and pilot to be overlooked for so loong. May be there is a catch which I am not getting yet!! Hopefully someone will point out....


PS: Editing html on blogger is a big pain!! eg. it gets rendered. One way out is to change the "<" of each html tag with "&lt;" and then blogger doesn't try to render it.....