Friday 30 October 2015

A tale of a nation that Imports Garbage


Global waste production has doubled over the past ten years. By 2025, the world will produce garbage at a rate of 2.5 billion tonnes per year. Poor waste management in many developing countries is a threat to human health and the environment. Many developing countries struggle towards a sustainable model for waste collection and disposal.Despite large expenditures many nations have failed to take care of this problem and India is one of them. 

As we say this,Something incredible has been taking place in Sweden over the past several years, somewhat of a “recycling revolution,” . Currently less than one percent of the garbage produced in Swedish homes ends up in the landfill today, with the other ninety-nine percent being recycled or composted.



Sweden has been known for years now for the amazing and resourceful waste management system that they have had in place for some time. They have 32 waste-to-energy (WTE) plants and this burned waste powers 20 percent of Sweden’s district heating as well as electricity for about 250,000 Swedish homes.

Here’s the problem: Swedes have become so good at recycling that there’s no longer enough garbage to meet the heating plants’ needs. Sweden now has to import the trash that most other countries are trying to dispose of — some 800,000 tons in 2014, up from 550,000 tons in 2010.

For Sweden, Waste today is a commodity in a different way than it has been. It’s not only waste, it’s business. For now, Sweden imports its trash mostly from Britain and Norway.

Waste to Energy process (In brief)

After recyclable content has been removed, the garbage is placed in incinerators that produce heat or energy, which is then transported to nearby homes. From the ashes, small pieces of metal, which do not burn, are separated and recycled, while those of porcelain and tile are sifted to extract gravel, which is used in road construction. The remaining one percent goes into landfills. And though garbage-infused smoke sounds highly poisonous, thanks to electric filters that give the particles a negative electric charge, in Sweden the smoke is almost entirely nontoxic carbon dioxide and water, which are cleaned again before release. 


The Environmental Effects

Of course there is some controversy over this method of waste management and energy production. There are fumes that are produced that are toxic, but many argue that this is still a much better alternative to the typical landfills that we see more often in our country. On average, more than forty percent of the world’s trash is burned and mostly in open air, this is much different from the regulated, low-emission process that has been adopted by Sweden. This makes Sweden’s method a lot more eco-friendly.

It is unfortunate that at this time the options are to either pollute the air, or pollute the Earth because we are producing so much garbage and it doesn’t just simply disappear without leaving its mark. It doesn’t look like manufacturers are going to stop making products that can’t be recycled anytime soon, so it is up to us to be more conscious with what we are consuming. We need to stop the problem at the source.

How Can We All Be A Bit More Like The Swedish? 

Sweden is an excellent example of a nation of citizens that care for their environment and their ecological footprint. If the Swedish are able to recycle 99% of their waste, why can’t we? Well we certainly can, however it does take a bit more effort(and that is where the problem lies with this country). I believe that it is truly worth the effort, soon it will become so natural to us that it won’t even feel effortful, we just have to start taking that step!


Dear "Import and Export Control Department of India", Can you please ask Sweden to come and get some trash from us as we've lots it and we haven't figured out what to do with it yet.

Although "Swachh Bharat Abhiyan" is an excellent initiative but the question is, Is it good enough?

Thursday 29 October 2015

SQUARE ROOT OF A NUMBER without using square root sign or any built in function - 2 methods


Recently, in an interview I was asked one simple question. How will you find a square root of  a number without  any built in function ?
I fumbled, but recovered well. Finally, I figured out two approaches. First one was Newton's method of finding the square root and second one was the one I had read during my graduation.

Method 1 (Newton's Method):

Algorithm :

We will assume square root to be s. 
s is less than square root of x (number whose square root we want to find) and x/s (Nuumber/Squareroot calculated in iterations) is greater than square root of x. Averaging these two (till the answer comes the same in two iterations) will give us the answer.

Program (C/C++/C#):


float sqrt(int x)
{
        int prev,k = 0;
        int kmax = 1000;
        float s = 1;
        for(k=0;k<kmax;k++)
        {
                prev = s;
                s = (s + x/s)/2;
                if(prev == s)
                {
                        break;
                }
        }
        return s;
}


Example :

let’s compute the square root of 9.

1. First Iteration
x = 9
k=0
s=1
prev=1
s = (1+9/1)/2 = 5
is(prev == s) -> No

2. Second Iteration
x = 9
k=1
prev=5
s=(5+9/5)/2 = 3.4


is(prev == s) -> No

3. Third Iteration
x = 9
k=2
prev=3(as it is int)
s=(3.4+9/3.4)/2 = 3.023 (This will be equal to 3 eventually)


is(prev == s) -> Yes
Stop...

Method 2 : 

This approach deals with finding a number which multiplied by itself becomes our given N(The number whose square root we want to find).The simplest way to do it would be to loop from zero to N(Number) multiplying each number by itself and verifying if it equals N.  
if we think about it for a while we  realize we can do it much faster, how?… Binary Search!.

Algorithm (Calculating Square root of 9):

We have our range of possible square roots: 0 to 9
1.- The idea is to get the middle element in our range: 9 + 0 / 2 = 4.5
2.- multiply it by itself: 4.5 * 4.5 let’s call this new value P = 20.25
3.- verify if P equals N(Actual Number i.e 9), if it does then we have found the square root of N, if not…
4.- Now we have two possibilities:
– P is greater than N: in this case we are will modify our range of possibilities because we know all numbers greater than 4.5 are not the square root, so now our range of possible square roots are between 0 and 4.5
– P is less than N: This is the opposite, so we would modify our lower bound instead of the upper bound. 4.5 to N(i.e 9 in this case)
We are going to repeat these steps until we find the square root of N.


Program (Python) :


#!/usr/bin/python -tt
 
import sys
 
def sqrt(n):
    start = 0
    end = n
    m = 0
    min_range = 0.0000000001;
     
    while end - start > min_range:
        m = (start + end) / 2.0;
        pow2 = m * m
        if abs(pow2 - n) <= min_range:
            return m
        elif pow2 < n:
            start = m
        else:
            end = m
             
    return m
 
def main():
    for line in sys.stdin:
        n = int(line)
        print sqrt(n)
 
if __name__ == '__main__':
    main()




Although we have built in functions to find out square root, This problem was not only a 
good brain exercise but also tested my logical skills.

I hope to come up with few more such interesting problems (this time before appearing for 
my next interview).

Monday 12 October 2015

Chinese currency(Yuan) devaluation


Few days ago,China perturbed global markets by devaluing its currency (the yuan). For a naive reader like me it was very difficult to understand what did it exactly mean and Why did China do it ?
In simple words, It adjusted the value of its currency downward compared to other currencies. The country cut the currency’s value against the dollar by approx 2% which was considered as the biggest move in a decade.

This post will explain and answer the question regarding this rattling move.


Why did China devalue its currency?

The yuan has been rising in value, when it should have been falling due to slowing economic growth and lower exports. Furthermore, the currencies of other developing countries have fallen. This has hurt Chinese exporters by making their goods more expensive abroad. China is hoping that the devaluation will improve the country’s economic growth and stimulate the declining export industry. Falling exports means China runs of the risk of large-scale job losses in manufacturing industries. It does not want that to occur.

What will the devaluation mean for China?

The devaluation means Chinese products are more competitive overseas. Chinese goods will be cheaper for overseas buyers. Thus the devaluation was welcomed by factory owners in China.On the flipside, imports will be more expensive. This will impact overseas companies.

What will the devaluation mean for India?

India and China officially resumed trade in 1978. India-China bilateral trade has reached $72.3 billion in 2014-15 (exports: $11.9 billion and imports: $60.4 billion), making China India’s largest goods trading partner. The devaluation will hurt Indian companies that want to export to China by making Indian goods more expensive. However, it will be cheaper for us to import goods.  This, in turn, will have a negative impact on Indian exports. Further, there will be an influx of Chinese goods into India, which will result in widening the already rising trade deficit (i.e. more Import over Export) with China.

World wide Impact of Yuan devaluation :

You can think of currency devaluation as a kind of nationwide sale. There are thousands of businesses in China that sell goods and services to customers in different foreign countries. Their goods are generally priced in China's own currency, the yuan. So if the yuan becomes less valuable relative to the dollar, Chinese imports suddenly become cheaper. In other words, when the yuan falls by 2 percent, as it has over the past few days, it's as if every business in China cut its prices for the World by 2 percent.

As sales help stores sell more of their products, a currency devaluation helps countries sell more exports, boosting the economy. Right now the Chinese economy is in the midst of an economic slowdown and has suffered from stock market turmoil, so it can use some extra help.

Of course, everything I've just said works in reverse for other countries. As the yuan gets cheaper, the other currencies get more expensive from the perspective of Chinese consumers. That means it's getting more expensive for Chinese people to import World-wide goods, so they're likely to import fewer of them. Lower demand for world-wide goods could mean slightly slower economic growth here in other countries.

For this reason, people often treat currency devaluation as a "win" for the devaluing country and a "loss" for the country whose currency gets more valuable.So, people outside China worry that further declines in the yuan could weaken economic growth outside of China.But it's important not to forget that the first-order result of a cheaper yuan is that world-wide consumers pay lower prices for Chinese goods.

Finally, I will end this discussion with the following question.

Can and should India also devalue its currency ?

The simple answer is India can not devalue its currency because the Indian Rupee exchange rate is market determined. The Rupee had been floating since 1993. The Reserve Bank of India can not devalue it like the Chinese central bank did. 

The RBI can intervene in the market to sell the Indian Rupee (and buy, say US Dollar) to depreciate Indian Rupee if it thinks that Rupee is overvalued but this has consequences - 


1) If the RBI target exchange rate is way off what the market thinks it should be and if market participants detect what RBI is doing then it can trade against that information and drag RBI into a potentially loss making large trade

2) A very low exchange rate will make imports more expensive thus increasing inflation. India is a net importer and had been running a high trade deficit (more imports than exports) for many years now. So an attempted "devaluation" by RBI even if successful will increase inflation

The Chinese  Yuan on the other hand is pegged against a basket of currencies (with Dollar probably the most important component in the basket) and is not freely floating. Consequently the central bank has more control over its rate.  

Friday 9 October 2015

Greece's Debt Crisis - My understanding

During last few days ,or months now, the Greek crisis – has made headlines around the world. Sometimes I wonder who caused this Economic Crisis. Teachers never stopped going to school, Police did there job, Army was at work, Fireman, office workers, laborers they all did there jobs. So if none of them was responsible, the question is who was. The Banks? The Government ? Or the People with virtual jobs ?

This article tries to answer some of above stated questions and explain in simple terms how Greece found itself in this mess.
Greece has been going through a financial meltdown for years. And since the country is a part of the eurozone, what happens in Greece doesn’t stay in Greece.

What does “Eurozone” means?

Throughout history, European countries were always at war with each other. After the Second World War, Europe was in ruins, its economy in shambles, and its political authority in the world diminished.
European countries realized that to survive in the post-War world with stability and relevance they could not afford more wars. For this, they had to find a way to come together and resolve differences. This led to the formation of the European Union (EU).

To make business easier, a common currency was introduced – the Euro. Countries which adopted the Euro formed the Eurozone; these countries abandoned their former currencies and allowed the newly formed European Central Bank (ECB) to make economic policies.

The eurozoneis a monetary union of 19 of the 28 European Union (EU) member states which have adopted the euro (€) as their common currency. The other nine members of the European Union continue to use their own national currencies.

The eurozone consists of Austria, Belgium, Cyprus, Estonia, Finland, France, Germany, Greece, Ireland,Italy, Latvia, Lithuania, Luxembourg, Malta, the Netherlands, Portugal, Slovakia, Slovenia, and Spain.


What is the main cause of crisis?

In 2001, Greece was given a chance to join the eurozone, and enjoy similar legitimacy in global markets as countries like Germany.To prove that Greece could handle sitting at the EU table, the country had to show that its budget was in check. It wasn’t. But Greece pretended that it was by doing things like moving certain expenses off the books. Once it got the OK to join the eurozone, the country started partying like it was at a big, fat, Greek wedding. Public sector wages rose to way more than a private-sector paycheck. Pension spending was way up, and it didn’t help that the retirement age was 58. Or that tax evasion was the norm. Then the global financial crisis hit, and soon everyone woke up to a Greek tragedy.

Greece eventually realized it was hundreds of billions of dollars in debt. It was forced to ask its European parents for help. The so-called “troika” of international creditors -- the IMF(International Monetory fund), ECB(European Central Bank), and euro member countries -- stepped in with a series of bailouts. In exchange, the troika said Greece better shape up. That meant austerity measures like public sector layoffs, pension cuts, and tax hikes.

What is the condition now?

Living standards are way down, and more than a quarter of the country is unemployed. A political party called Syriza that pledged to change all this mess was elected to power on promises to undo austerity. For months, the new government and its creditors fought over the terms of yet another bailout plan. In the meantime, Greece became the first eurozone country to go into default.Greece and its international parents finally agreed on the terms for a third bailout plan. But it’s unclear if Greece’s anti-austerity lawmakers are going to go along with the plan. They're deciding whether hold a snap election to kick the current prime minister out of power.

What if Greece goes bankrupt?

If this continues, Greece could default (meaning, be declared bankrupt). Normally, a small country like Greece defaulting wouldn’t cause international concern. But because of the Eurozone, if Greece defaults, Spain or Ireland could be next. Then Italy, then Portugal, France and then Germany – and with that the entire world will be dragged into the major economic crisis. This could lead to civil unrest; political instability and possibly warfare.


In the next few days Greece will be at the center of the universe; the international spotlight will be focused on the Greek people.The future of Europe – and the world – hangs delicately in balance.

Friday 2 October 2015

Indian Products - Foreign Names


Name Matters! Name of the person. Name of the company. Name of the college. Everything is just but a name. You are known by that one thing which brings up the imagery of the live thing just from the name. Hence there is so much of research happening on what names to be given to the kids, to the website, to the domains, to the product and so on. 

Whenever we buy anything what do we look for? Brand name. Yes, we look for our favorite brand. Trust, quality, image, promises, and glamour – we see all of these things in our favorite brand and we are deeply loyal to these brands. There are many Indian brands which enjoy tremendous brand recognition, have huge brand loyal customers and a lion’s share of market. This is a competitive world, survival of the fittest and toughest and never dies attitude is needed for survival and for profitability too. To survive in this market, many companys have adopted  a simple strategy.
To Impress an Indian, talk in Hindi if you are a foreigner or talk in English if you are an Indian. 

Indian consumer has a mindset that whatever sounds English is better than the Indian counterpart of it. The success of all the Indian companies lies in it up to some extend, this doesn't mean their products were bad but surely means that their names helped them a lot on the way, be it Godrej, Reliance, Videocon, Hero,  or Tata. Though they sound familiar to us now,in the starting days they were thought as foreign brands.

This also can be seen in the failure of many Indian good quality products such as Vicco, Miswak, Hamam or Medimix for that matter. Though they are fairly marketed and quite a success but when you compare them with their foreign counterpart, they are next to nothing in terms of market share. You yourself can see how Nirma was taken over by Surf Excel and Tide in these days. 

In the FMCG markets, you will have to give the customer what he wants or you will have to make your product wanted, no matter how bad it is. So naming the product is the process of making your product WANTED in Indian market. 

This nerve of Indian Customer is expertly identified by the expert marketers in big organisations hence the new Indian products have English names.

List of few Indian Brands having Foreign names. 
1.  Van Heusen
2.  Allen Solly
3. HDFC
4. CCD
5. Kwality Wall's
6. Royal Enfield
7. Old monk
8. Louis Phillipe
9. Lakme 
10. Airtel


Keeping an English name helps many other aspects.

1. The same product can be sold in international markets without having to spend more on creation of the marketing collateral for the new name.
2.  Reduction of redundant costs. And for that reason, now ads are coming with multi-geography subjects in the commercials and not just Indians featuring in them.
3. Indian names are hard to pronounce by people in international geographies. Hence English names.
4. Indians are biased towards American stuff. And it makes total business sense to go with the tide rather than trying to stand up with a Hindi name. Your purpose is to sell and do business not solve a nomenclature riddle.

I guess this is it.. WE LOVE WHATEVER IS ENGLISH.