There is this funny story about the “Cobra Effect” based on an anecdote from British colonial time in Delhi Apparently, the officials of the British government were terrified by a large number of venomous cobra snakes in the city. To solve the problem, someone came up with a brilliant idea of an exchange offer to the people of Delhi. Money for dead cobras.Guess what happened next? Soon, the enterprising Delhiites were breeding cobras. When the government found out, they scrapped the bounty scheme, whereupon the cobra breeders set the snakes free. And the cobra population went up, not down.A similar incident occurred in Hanoi under the French colonial rule. There were too many rats, so the rulers introduced a bounty scheme for, of all things, rat tails. Pretty soon, Hanoi was full of tail-less rats running around. The bounty hunters never killed them. Instead, they just severed their tails, released them back into the sewers, so that they could continue to procreate and make more rats, which of course, increased the rat catchers’ income.Why did both situations backfire? Because well-intentioned people who created the bounty schemes didn’t think about second order effects. They didn’t pause, reflect and ask how people will respond to their brilliant-sounding idea.Thinking about first-order effects is easy. Thinking about second or higher order effects is hard. Charlie Munger complains that:Too little attention [is given] in economics to second order and even higher order effects. This defect is quite understandable, because the consequences have consequences, and the consequences of the consequences have consequences, and so on. It gets very complicated.It’s fascinating to observe how this problem keeps on repeating over and over again. One variant is called “you get what you measure.” For instance, if hospitals are asked to publish their mortality rate, the ones with the highest mortality rates are incentivised to turn away terminally ill patients.If someone is paid on a cost-plus basis (e.g. for generating electricity), you can be confident that there will be plenty of gaming in the form of cost padding. Businesses which pay their managers to deliver strong near-term earnings also create incentives for those managers to cut corners which increase near-term earnings (for example by cutting expenditures on brand building, research and development, and employee training) but destroy long-term value.Another variant of this issue is something I learnt from the famous investor Jim Rogers who, in one of his books wrote that you (i.e. a regulator) can either control the price of a product or a service, or its supply, but you can't do both.Back in the days of industrial licensing, the government wanted to fix both the maximum production of Bajaj Auto scooters in a year and their maximum price. It failed to do both. Limiting production well below actual demand simply caused a black market to emerge and lucky allottees would simply sell their allotment letters at several times the maximum price allowed to be charged by the government.The US government spends tens of billions of dollars every year to stop addictive drugs from reaching its populace. Its prisons are full of drug dealers and drug addicts. All that money spent does nothing but increase the price of drugs and profit margin for those folks, who have an incentive to smuggle it across the US border. No matter how risky the US government makes it for smugglers and drug dealers to do whatever they do, the addicts can still buy the drugs. The more they try to stop it, the more they fail. In the meantime, tens of billions of dollars spent every year could have been spent on finding a solution for malaria. Also, in the meantime, in another country — the Netherlands — where drugs are legal, crime rates are so low that the government is shutting down prisons.Back in India, they price of urea so low that it gets smuggled across the borders to Sri Lanka, Bangladesh and Nepal and sold at much higher prices.Recently, the Indian government put a cap on the price of stents used in heart surgery — even for private, for-profit hospitals. Soon after the price controls were announced, some manufacturers announced their intention to withdraw their stents from the market. So, while the original intention (stop price gauging) was good, the outcome is not. Do we need a black market in stents?In 1975, American economist Steven Peltzman studied the impact of seatbelt laws on automobile death rate. What he found was quite revealing. While the use of seatbelts made people safer inside the car, it also made people drive more rashly. As a result, there were more accidents causing more fatalities outside the cars. The two effects cancelled each other and there was no overall reduction in the number of automobile deaths.This effect, called the Peltzman effect, has wider applications. Basically, the idea is that whenever the government tries to regulate something, there will be an incentive for people to game the system. And gaming systems comes as naturally to some people as breathing. We all remember what happened during the hours after our PM appeared on TV on the night of November 8, 2016, don’t we?One of the key elements of a good system design, therefore, is to avoid creating incentives to game it as much as possible. People who design systems should always ask a critically important question: “And then what?” to make them think of ways in which people will game them.This particular idea — of asking “and then what?” applies not just to regulators. It applies to everyone, including investors. As Warren Buffett writes:The key thing in economics, whenever someone makes an assertion to you, is to always ask, “And then what?” Actually, it’s not such a bad idea to ask it about everything but you should always ask, “And then what?”Indeed, some of the best investment ideas occur when a great business encounters a problem which causes a temporary blip in its earnings growth but is perceived by the market as a significant-negative news. The loss of a customer which does not destroy the business. A flood. A fire. A strike.A few bad quarters caused by temporary factors — my current favourites are demonitisation and GST — which have absolutely no bearing on the business’s bond with the customer and its ability to deliver profitable growth over the long term.The market is a pari-mutuel system wherein one is not betting against the house, but is betting against other investors. In such a system, the behaviour of others changes the odds. If temporary bad news causes stock prices to decline much more than they should, smart investors see that as an opportunity.Paradoxically, bad news for a business can be great news for an investor, because it gives him a rare chance to buy at a fabulous price. Such an investor does not panic and run for the exit at the first time of trouble. He pauses. He reflects while others panic and sell. He quietens his mind so as to avoid jumping to hasty conclusions. He carefully studies the “bad” news. He notes the drop in price.And once in a while, his analysis shows that the market’s reaction is overdone and he buys into a wonderful business at a bargain price.Thinking about first order effects is easy. Thinking about second or higher order effects is hard. But just because it’s harder, doesn’t mean one shouldn’t do it. Indeed, the practice of routinely thinking about second and higher order effects by asking “and then what?” should not be limited to chess players and regulators. It should be adopted by investors as well.