Wednesday, June 27, 2012

Basics of mobile terminologies

Disclaimer - I am posting this article from Economic Times.

Below are some terms we have heard these days in smart phone comparisons, and there are some of the more important considerations -

1. Display 

Today, we have displays of different sizes and compositions, each one claiming to be better than the other. 

Associated Terms: AMOLED, LCD, Super LCD, Retina, PPI, ClearBlack. What you need to know: Bigger displays might look better but also drain battery life. And while we recommend going for the highest resolution screen within your budget, do remember to check if the apps you want to use support that resolution. As for the AMOLED vs LCD debate, we advise you to trust your eyes to 'see' which one works best for you. As a general rule, AMOLEDs are brighter and produce richer colours, but LCDs render text better. 

2.  Processor 

The processor is the engine that drives your phone. As phones become more powerful, processors are getting into dual core and quad core territory. 

Associated Terms/ Figures: Dual Core, Quad Core, 800 MHz, 1/1.2/1.5GHz, Snapdragon, Tegra, Intel, Qualcomm. 

What you need to know: A faster processor with more cores will work better, but what you need to keep in mind is whether the operating system and apps on your device are actually designed to use the extra power. If you're only looking for good web browsing, social networking and some casual gaming, a single core 800 MHz processor will do nicely too. 

3.  RAM 

The RAM allows the phone to run multiple applications simultaneously and do various tasks in the background.

Associated Terms/ Figures: 256 MB, 512 MB, 768 MB, 1 GB. 

What you need to know: While some operating systems need more RAM, others will function smoothly with lesser amounts. For instance, you'll see a lot of new Android devices with 1 GB of RAM, but most Windows Phone devices run fine at 512 MB and many Symbian devices work fine at even 256 MB. It is not really about the amount of RAM but about the OS of your device. 

4.  Camera 

Once considered a luxury in smartphones, the camera is now an integral part of smartphones. 

Associated terms: 3.2/5/8/12/41 Megapixels, Auto Focus, Shooting Modes, HD video, LED/Xenon flash. 

What you need to know: There is a whole lot more to any camera than megapixels. The quality of the lens, the camera software and the presence of options like autofocus and different scene settings make a world of difference - so much so, that many 5MP cameraphones outperform 8MP ones. If you want to take loads of photographs, check for features like auto focus/touch focus, xenon flash, face detection, macro mode and red eye reduction. 

5.  Battery 

The battery (with a capacity expressed in mAh or milli ampere hour) determines how long your phone keeps working on a single charge. As phones get bigger, so do their batteries. 

Associated terms: Li-ion, mAh, removable, non-removable 

What you need to know: While battery life varies a lot depending on how you use a phone, a phone with a battery that has a high mAh count will generally offer better backup. Operating systems like Symbian and BlackBerry also tend to manage battery life better than the likes of Android and iOS. As for the 'removable vs non-removable' issue, we have not seen it making a major difference - unless you plug your phone in several times a day, necessitating a battery replacement before you actually need to change your phone.

Monday, June 25, 2012

Difference between Pram and Stroller

Recently I became a first time father, father of my son "Varenya Bisht." These days I and my wife (Nirmala) buying out lot of new things for Varenya, and while looking for Pram and Stroller we were confused between these two terms - Pram and Stroller.
Me and Nirmala, googled the term and found this difference between two -


Pram and stroller are used interchangeably; however, their main difference is that prams are used to carry new born babies until they are able to sit up while strollers are used to carry toddlers or infants who are already able to sit up. Another significant difference between the two is prams are bulky and heavy which is not a good choice for child transport when going to the malls or when carrying them in the car while strollers are lightweight and most models of strollers are collapsible. Additionally, prams’ carriages are high while the strollers’ seats ride low to the ground.
There are baby carriages that are hybrid of prams and strollers which are practical to buy as you will not have to change the carriage quickly as your child gets older. However, in choosing the best carriage, you should consider your child’s comfort.


Source:- http://www.differencebetween.com/difference-between-pram-and-vs-stroller/#ixzz1ymnOrrni

Thursday, May 10, 2012


Solution to - On creating apache cxf web service getting error: org.apache.cxf.service.factory.ServiceConstructionException and xxx counts of com.sun.xml.bind.v2.runtime.IllegalAnnotationExceptions


Complete stack trace is: - 



Exception in thread "main" org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:351)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:460)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:548)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:523)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:271)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:177)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:51)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:115)
at com.landisgyr.iec61968.cl.transports.ummv2ws.ServiceObjectTransport.init(ServiceObjectTransport.java:59)
at com.landisgyr.iec61968.cl.transports.ummv2ws.ServiceObjectTransport.start(ServiceObjectTransport.java:44)
at com.landisgyr.iec61968.cl.protocols.CLProtocol.start(CLProtocol.java:454)
at com.landisgyr.iec61968.cl.common.CommunicationLibrary.start(CommunicationLibrary.java:181)
at c1.test.TestComLibPOC.main(TestComLibPOC.java:113)
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 3 counts of IllegalAnnotationExceptions
Two classes have the same XML type name "{http://iec.ch/TC57/2011/schema/message}Response". Use @XmlType.name and @XmlType.namespace to assign different names to them.
this problem is related to the following location:
at com.landisgyr.iec61968.cl.transports.ummv2ws.jaxws_asm.PublishEventResponse
this problem is related to the following location:
at com.landisgyr.iec61968.cl.transports.ummv2ws.jaxws_asm.RequestResponse
Two classes have the same XML type name "{http://iec.ch/TC57/2011/schema/message}Response". Use @XmlType.name and @XmlType.namespace to assign different names to them.
this problem is related to the following location:
at com.landisgyr.iec61968.cl.transports.ummv2ws.jaxws_asm.RequestResponse
this problem is related to the following location:
at com.landisgyr.iec61968.cl.transports.ummv2ws.jaxws_asm.Response
Two classes have the same XML type name "{http://iec.ch/TC57/2011/schema/message}Response". Use @XmlType.name and @XmlType.namespace to assign different names to them.
this problem is related to the following location:
at com.landisgyr.iec61968.cl.transports.ummv2ws.jaxws_asm.Response
this problem is related to the following location:
at com.landisgyr.iec61968.cl.transports.ummv2ws.jaxws_asm.ResponseResponse


at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:472)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:302)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1136)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.xml.bind.ContextFinder.newInstance(Unknown Source)
at javax.xml.bind.ContextFinder.find(Unknown Source)
at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
at org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(JAXBDataBinding.java:510)
at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:334)
... 14 more

I have found the solution here - 

In my case the web service method name is: - 


    @RequestWrapper(localName = "Request", targetNamespace = "http://iec.ch/TC57/2011/schema/message", className = "IEC61968.ch.iec.tc57.LG._2011.RequestMessageType")
    @WebMethod(operationName = "Request", action = "http://iec.ch/61968/Request")
    @ResponseWrapper(localName = "Response", targetNamespace = "http://iec.ch/TC57/2011/schema/message", className = "IEC61968.ch.iec.tc57.LG._2011.ResponseMessageType")
    public void request(
        @WebParam(mode = WebParam.Mode.INOUT, name = "Header", targetNamespace = "")
        javax.xml.ws.Holder<HeaderType> header,
        @WebParam(name = "Request", targetNamespace = "http://iec.ch/TC57/2011/schema/message")
        RequestType request,
        @WebParam(mode = WebParam.Mode.INOUT, name = "Payload", targetNamespace = "")
        javax.xml.ws.Holder<PayloadType> payload,
        @WebParam(mode = WebParam.Mode.OUT, name = "Reply", targetNamespace = "")
        javax.xml.ws.Holder<ReplyType> reply
    );

In this case the method name is - 'request', and also the method parameter name is - 'request'

JAX-WS generates a class for each method, in this case the class name constructed is-methodName + "Response", which is actually translates toRequestResponse
In my case, the newly generated class by JAX-WS will have the same name as my method parameter  name which is a request by name, JAX-WS also generates the same class name - 'RequestResponse'. That is why the reason for conflict.

I have  changed the method parameter name from 'request' to 'req', and it works perfectly fine, and I am able to start the web service with no issues. Thanks to stackoverflow.com and Rosdi Kasim.


Wednesday, November 23, 2011

To calculate length or size, why array is having a ‘length’ property while the list is having a ‘size()’ method?



int[] arrayInt = new int[] {1, 2, 3, 4, 5, 6};

O/P is: -
arrInt.length = 6

array.length is actually a public final member/field of the array, which contains the number of components of the array. It is final because arrays in java are immutable, which means once the array is defined then an array can not be grow or shrink, however the elements within the array can change. So, it means once the size of array is defined it can not be changed, that is why it is final and treated as a property/field/instance variable.

A java array is allocated with a fixed number of element slots. The "length" attribute will tell you how many. That number is immutable for the life of the array. For a resizable equivalent, you need one of the java.util.List classes - where you can use the size() method to find out how many elements are in use.

List<Integer> list = new ArrayList<Integer>(20);
list.add(1);
list.add(2);
list.add(3);

O/P is: -
list.size() = 3

java.util.List is used when you want a datastructure where you can grow/shrink your datastructure easily as per the need. In java.util.List, the field/property is kept private because java.util.List can be grow/shrink as per the need. So, the size is keeps changing on addition/removal of element from the java.util.List. So, it means java.util.List is a mutable object, and that is why the reason size is a method which returns the size of java.util.List, that is, it tells the number of item currently present in the list irrespective of its capacity.

Monday, November 21, 2011

Why Integer 128 == 128 is false? but 127 == 127 is true ?

Still the question is not clear? Let's rephrase it in this way: - 


Why two integer objects with same value are not equal when using auto-boxing? I mean, let say - Integer i1 = 128, and Integer i2 = 128; i1 and i2 are not equal using ‘==’ operator. On the other hand 127 is equals to 127 i.e. 127 == 127 Why?

Below is the snippet of the java program: -

Integer i1 = 127;
Integer i2 = 127;
Integer i3 = 128;
Integer i4 = 128;
       
if (i1 == i2) { // true
        System.out.println("i1 and i2 are equal");
} else {
        System.out.println("i1 and i2 are not equal");
}
 
if (i3 == i4) { // false
        System.out.println("i3 and i4 are equal");
} else {
        System.out.println("i3 and i4 are not equal");
}
 
O/P (Output is): -
        i1 and i2 are equal
        i3 and i4 are not equal
 

Why i3 is not equal to i4?


Instances of "Integer" are not necessarily unique. An Integer instance is an object; you can think of your 'i3' and 'i4' variables as pointers to a chunk of RAM. That chunk of RAM wraps around an 'int' value.


Java 5 implements 'auto-boxing', a syntaxic feature which tries to automatically fill the gap between the 'int' type (the 32-bit signed integer) and the 'Integer' type (the class where every instance contains an 'int' value). 

The key to understanding this is that the JVM uses a process called "boxing" (or "auto-boxing") when converting an int (like 127) to an Integer object. This involves calling the Integer.valueOf(127) method.

The JavaDoc:java.lang.Integer#valueOf(int)says: "Returns a Integer instance representing the specified int value.



When you write this:


  Integer x = 128;


What actually gets compiled is:


  Integer x = Integer.valueOf(128);


Where Integer.valueOf() is a static method which returns an Integer instance containing the provided 'int' value. Integer.valueOf() may return the same instance twice, or not; in practice, the implementation of Integer.valueOf() often caches instances for small integers, e.g. those from -128 to 127. For other values, it performs a simple 'new Integer(val)' and returns that, hence a new instance every time. This is what you observe.

If a new Integer instance is not required, this method should generally be used in preference to the constructor Integer(int), as this method is likely to yield significantly better space and time performance by caching frequently requested values."  


Integer.valueOf(...) caches int values specifically from -128 to 127. It means if the integer value comes in the range of -128 to 127, then a new instance creation is not required, the valueOf() get the existing instance from the cache if the object is already created, that is, the cached object will be returned.

What that means is that the valueOf() method has a cache of Integer objects, and if the primitive being boxed is in that range, the cached object is returned. It just so happens that 127 are in that range, but 128 is not. So i1 and i2 are the same object, while i3 and j4 are not.


When you use '==' on two 'Integer' values, you are comparing the pointers (the "references" in Java terminology). If two pointers are equal then they point to the same instance, wrapping around a unique value. But if two pointers are distinct, it just means that they point to distinct instances, _not_ that those instances contain distinct 'int' values.


Operators are not overloaded in Java (well, at least not to that point). If you want a numerical comparison then you have to get the numbers themselves, not the wrappers:


  Integer a128 = 128;
  Integer b128 = 128;
  if (a128 == b128) {
      /* you have compared the pointers */
  }
  if (a128.intValue() == b128.intValue()) {
      /* you have compared the numerical values */
  }


Auto-boxing blurs the line a bit between class instances and plain integers, but that does not make integers objects in their own right. The point of auto-boxing is to ease the syntaxic use of integers as keys or values in collections (List, Map...).

So, in order to save memory when primitive types are boxed into the wrapper types, the JVM allocates memory and creates a new object. But for some special cases, the JVM reuses the same object, two instances of the following wrapper objects will always be == when their primitive values are the same. 
  • Boolean
  • Byte
  • Character from \u0000 to \u007f (7f is 127 in decimal)
  • Short and Integer from -128 to 127


Conclusion: - This new feature in J2SE 5.0 has both advantanges and disadvantess, it all depends on where and how are we using the feature. It is recommended by SUN to use them only when there is an “impedance mismatch” between reference types and primitives, for example, when you have to put numerical values into a collection. It is not appropriate to use autoboxing and unboxing for scientific computing, or other performance-sensitive numerical code. An Integer is not a substitute for an int; autoboxing and unboxing blur the distinction between primitive types and reference types, but they do not eliminate it.


References: - 
http://www.javabeat.net/articles/31-autoboxing-in-java-50-2.html
- http://www.javakb.com/Uwe/Forum.aspx/java-programmer/50090/Integer-128-Integer-128

Sunday, September 4, 2011

What is happening these days in market? Am I safe? Is my basic understanding correct?

 I was talking to my relatives and friends about the current market situations, we all had lot of questions on each aspect of the markets, jobs, savings, and also future perspectives. Below I did some work and picked up those lines which we had discussed over phone calls, discussions which happened during office lunch hours. I also visited lot of websites to gather some basic information about the subject as well, below is the snapshot of the same in FAQ form...


DISCLAIMER - I admit, I am not a financial expert, and I do not even have a good theoretical/practical experience in finance. I just read the news paper, blogs, articles in magazines and talking with friends, relatives and also to those who are experts and having some experience of the finance, which I’m happy to share. 
I hope you and your family will be secure, live a healthy, wealthy and happy life and prepared in the event of any kind of Recession.

I am always on learning mode, please correct me wherever you think - it could be anything like technical part, look-n-feel, English grammar, way of explanation or the way to publish articles.


The motto is to share the knowledge to the world what I have.


Question: These days I always heard about growth and recession stories, can you explain this in detail?
Answer: Very true, these days it seems to be very common to hear about recessions and growth stories in news papers, media, offices, metros, at bus stop, railway stations and many more countless places.

Economist says, growth means increase in the number of goods, services (also called as productivity) that an economy produces over time. Meaning more jobs are created, higher wages. It reflects the improvement in country's standard of living.

Economic growth is measured as a percentage change in the Gross Domestic Product (GDP) or Gross National Product (GNP). These two measures, which are calculated slightly differently, total the amounts paid for the goods and services that a country produced.
As an example of measuring economic growth, an indistry (or a country) which creates Rupees 9,000 in goods and services in 2010 and then creates 9,090 in 2011, has an economic growth rate of 1% for 2011.

Recession is when growth slows, the economy contracts. Usually due to drop in sales, fall-off in consumer demand, businesses stop expanding. Soon afterwards, it includes stop hiring new workers, and finally layoffs begins. In recession, GDP growth must be negative for two consecutive quarters or more. A good example was the stock market crash and subsequent economic downturn in 2000. Another good example is the most recent recession which happened in year 2008, also known as The Great Recession. The only good thing about a recession is that it cures inflation.



Question: How you say the country's standard of living has been improved?
Answer: GDP per capita is often considered an indicator of a country's standard of living. "Per capita" is commonly used in statistics, in simpler terms it means "for each person" or "per person"

GDP per person is when you take the entire output of a country's economy and divide it by the number of its citizens.

GDP per person allows you to compare the prosperity of countries with different sizes. For example, GDP in the U.S. is $14.7 trillion, which is one of the largest. This makes it seem the U.S. is the most prosperous country in the world. (The EU is actually the largest economy, at $14.9 trillion -- but it's an economy made up of 29 separate countries).

However, its prosperity is because it is the third most populous country in the world. Its GDP per person is $47,400, still pretty good -- it's the 10th most prosperous country per person. The most prosperous country per person is Qatar -- its GDP per person is $147,500 (All figures are 2010 estimates from the CIA World Factbook).

The standard of living is closely related to quality of life. It refers to the level of wealth, comfort, material goods, quality and affordability of housing, number of vacation days per year, affordable access to quality healthcare, quality of education, life expectancy, infrastructure, environmental quality, climate and safety.

The GDP growth rate measures how fast the economy is growing. Technically, it is the percentage increase or decrease of GDP (Gross Domestic Product)compared to the previous quarter. The GDP growth rate is driven by retail expenditures, government spending, exports and inventory levels.

So, if your country is growing then it means your standard of living will be improving.

Here you find the economy of India: http://en.wikipedia.org/wiki/Economy_of_India

India's per capita income (nominal) is $1220, ranked 142nd in the world, while its per capita purchasing power parity(PPP) of US $3,665 is ranked 129th.
It is estimated that India's Per Capita Income will register an average growth rate of 12% during 2011-20 so as to reach $3,790 by 2020. In the year 2020 India's real GDP is projected to be at $4.42 trillions & per capita Nominal GDP would be at $3,225. India's per capita purchasing power parity(PPP) will be at $9,875 in the year 2020.


Question: What is GDP (Gross domestic product)?
Answer: Economic growth is measured by the percentage increase or decrease of GDP (Gross domestic product) compared to the previous quarter. The GDP growth rate is driven by retail expenditures, government spendings, exports and inventory levels.

Rises in imports and reduction in exports will negatively affect the economic growth.

The GDP growth rate is the most important indicator of economic health. If it is growing, if it is growing, then it means business, jobs and personal income will be increased.

If the GDP is slowing down, then businesses will hold off new investments and hiring of new employees, waiting to see if the economy will improve. This, in turn, can easily further depress the economy and consumers have less money to spend on purchases. It turns down the GDP growth rate to negative. And if the GDP turns down to negative numbers then it is heading towards the recession.

When the economy is expanding, the GDP growth rate is positive, which means the country is growing.

GDP is calculated in various ways, you can get complete description and it's components in details here - http://en.wikipedia.org/wiki/Gross_Domestic_Product

A good way to compare GDP between countries is with GDP per capita. This divides the country's economic output by the number of people. It gives a good indication of how wealthy each person feels.


Question: In the first question you also talked about recession, and these days I am also hearing about credit ratings as well. What does it means?
Answer: A credit rating evaluates the credit worthiness of a debt issuer. Debt issued by a business enterprise, a corporation or a government.It is an evaluation made by credit rating agency. Evaluation involves the qualitative and quantitative information for a company or a government; including non-public information obtained by the credit rating agencies analysts.

In the simple terms, credit rating indicates the rating agency’s opinion on particular country or company’s repayment capacity of the debt. This rating helps to judge whether that company or country can repay the debt on time.

Credit ratings are not calculated based on mathematical formulas. Instead, credit rating agencies use their judgment and experience in determining what public and private information should be considered in giving a rating to a particular company or government.

The credit rating is used by individuals and entities that purchase the bonds issued by companies and governments to determine the likelihood that the government will pay its bond obligations.

A poor credit rating indicates a credit rating agency's opinion that the company or government has a high risk of defaulting.


Question: I keep on hearing credit scores while my friends/relatives takes loan from the banks. Are both credit scores and credit rating are same?
Answer: No these two are completely different. Credit ratings are often confused with credit scores. 'Credit Ratings' is not based on any mathematical formula, it is purely an analysis. Credit ratings are meant for a business enterprise, a corporation or a government. It tells there worthiness.On the other hand, 'Credit Scores' are meant for an Individual and completely based on the mathematical formula. Credit scores are the output of mathematical calculations that assign numerical values to information in an individual's credit report.
The credit report contains information regarding the financial history and current assets and liabilities of an individual including information about late payments .
A bank or credit card company will use the credit score to estimate the probability that the individual will pay back loan or will pay back charges on a credit card.
A poor credit score indicates that in the past, other individuals with similar credit reports defaulted on loans.
Note: - Credit history, credit report or credit scores all are related.


Question: Does a credit rating assure repayment? 
Answer: A credit rating is not an assurance of repayment of the rated instrument. Rather, it is an opinion on the relative degree of risk associated with such repayment. This opinion represents a probabilistic estimate of the likelihood of default.


Question: What do the various credit rating symbols mean? 
Answer: CRISIL uses simple alphanumeric symbols to convey credit ratings. CRISIL assigns credit ratings to debt obligations on three basic scales: the long-term scale, the short-term scale, and the fixed deposit scale. To illustrate, CRISIL's long-term credit rating scale and the description associated with each category on the rating scale is given below:
------------------------------------------------------------------------------------------------------------
Symbol Description
(Rating category). (with regard to the likelihood of meeting the debt obligations on time)
-------------------- ------------------------------------------------------------------------
AAA Highest Safety
AA High Safety
A Adequate Safety
BBB Moderate Safety
BB Inadequate Safety
B High Risk
C Substantial Risk
D Default
------------------------------------------------------------------------------------------------------------


Question: What are popular Credit Rating Agencies?
Answer: Credit rating has been given by the number of companies in the world. There are companies who give the credit rating for companies and few companies rate the country. The following is the list of few popular rating agencies across the world:
* Moody’s Analytics
* Fitch Group
* Standard & Poor’s
* CRISIL
* A. M. Best
* Morningstar, Inc.

S & P is the third most popular credit rating agency. Moody’s and Fitch are the first two popular rating agency. They both maintain the same rating for USA and will continue the same. Also Fitch has indicated that after this month it will review the rating for USA.

S & P said in the recent statement that India, Japan and other Asian countries to maintain the balance sheet healthy. Otherwise it would downgrade the rating for these countries.


Question: Why The US Credit Rating Was Downgraded?
Answer: The reason was the ability to repay the debt.

On August 5th, Standard & Poor’s (S&P), one of three major rating agencies, downgraded the U.S. from AAA (triple 'A') rating to AA+ (double 'A' plus) rating, the first such downgrade in the history of the United States.

Some facts: -

  • In year 2008 year end, total federal debt was $10.7 trillion
  • Currently it is $14.6 trillion.

"Debt as a percentage of GDP was a painful 69 percent at the end of the Bush years, but Mr. Obama is pushing it over 100 percent, another disgraceful historic milestone."

Why S&P downgraded -

• U.S. Tax revenue: $2,170,000,000,000
• Federal budget: $3,820,000,000,000
• New debt: $ 1,650,000,000,000
• National debt: $14,271,000,000,000
• Recent budget cut: $ 38,500,000,000

Let’s remove 8 zeros and just consider it as a household budget:

• Annual family income: $21,700
• Money the family spent: $38,200
• New debt on the credit card: $16,500
• Outstanding balance on the credit card: $142,710
• Total budget cuts: $385

Do you think this family deserves an AAA credit score?
Would you lend this family money?
And if you have already lend money to this family then, definitely you ask back your money before this family gets default, because you have the fear that this family may default.

In more detail for US downgrade, read the below article: - The 3 U.S. Policy Mistakes Most Responsible for S&P Downgrade


Question: I also heard people talking about "Double Dip Recession" in my office.  What is a "Double Dip Recession"?
Answer: Some people says United States (U.S.) is likely moving back again into recession. Such a move would bring United States into a "Double Dip Recession".

Double Dip Recession appears when Gross Domestic Product (GDP) growth slides down to negative after couple of quarter show casing the positive growth.

A double-dip recession refers to another recession followed by a short-lived recovery after a recession.

The causes for a double-dip recession vary but often include a slowdown in the demand for goods and services because of layoffs and spending cutbacks from the previous downturn. It is also called as W-Shaped recesion, because it shows two V-shape recession and in between a short recovery. Many experts in the economic and financial sector have voiced concern.

What It Means to You

Whether the economy is a U or a W, life will not be returning to "normal" for quite a while. A healthy economy requires 2-3% GDP growth and 150,000 new jobs per month. This probably won't happen until banks return to normal lending activity, no matter how much the government spends.


Question: Hmm interesting, are there any other kinds of recessions?
Answer: Offcourse yes, there are L, U, V or W-shaped recession.

V-Shaped recession -  It is similar to the ones in 1990 and 2001. This is one that is very deep, but short-lived and bounces back strongly. A clear example of a v-shaped recession is the Recession of 1953 in the United States.

W-Shaped recession -  It is also called as double-dip recession, it refers to a recession followed by a short-lived recovery, followed by another recession . The early 1980s recession in the United States is cited as an example of a W-shaped recession.

U-Shaped recession -  It has a longer decline before it bounces back. It is longer than a U and V-shaped recession. The 1973–75 recession can be considered a U-shaped recession.

L-shaped recession - An L-shaped recession occurs when an economy has a severe recession and does not return to trend line growth for many years, if ever. The steep drop, followed by a flat line makes the shape of an L. This is the most severe of the different shapes of recession. A classic example of an L-shaped recession occurred in Japan following the bursting of the Japanese asset price bubble in 1990.


Question: Recently in a debate in news channel I listen a guy coined a term "Economic Depression". What's that?
Answer: There is no agreed definition of the term depression, though some have been proposed. It is a more severe downturn than a recession, it lasts several years. Fortunately, the U.S. economy has not experienced an economic depression since The Great Depression of 1929-30, which lasted ten years.
By 1933, the height of the Depression, unemployment had risen from 3% to 25% of the nation’s workforce. Wages for those who still had jobs fell 42%. GDP was cut in half, from $103 to $55 billion.


Question: What Ended the Great Depression of 1929?
Answer: In 1932, Franklin Delano Roosevelt was elected President based on his promises to create Federal Government programs to end the Great Depression. Within 100 days the “New Deal” was signed into law. This created 42 new agencies designed to create jobs, allow unionization, and provide unemployment insurance. Many of these programs, such as Social Security, the SEC (Securities and Exchange Commission), and FDIC (Federal Deposit Insurance Corporation) are still here today, helping to safeguard the economy.
However, the extent of the Great Depression was so great that government programs alone could not end it. Unemployment remained in the double-digits until 1941, when the U.S. entry into World War II created defense-related jobs.


Question: Could a Great Depression Happen Again?
Answer: A Depression on the scale of that in 1929 could not happen exactly the way it did before. Central banks around the world, including the U.S. Federal Reserve, are so much more aware of the importance of monetary policy in regulating the economy.
The current thinking is that a Great Depression could not happen again because the global economy is much more integrated, and all central banks are working together to make sure it doesn’t.


Question: Does the downgrade of US will make any impact on Indian economy?
Answer: You know most of the countries in this world works for US, or you can say these countries generates economy by exporting items to US.
Japan exports Cars, etc; CHina exports, laptop, toys, electronic goods etc; India exports textiles, software etc, and many more.

So in case, if US economy hits, it definitely impact all its depending countries. In case of India, India exports almost 1 out of every 15 items to US, with fears of default, there is worry in the order books. Importers in US may hold back the new orders because of slodown in the US. So definitely it affect all the countries of the world in direct or in-direct way.


Question: So, it seems the job does not look safe.
Answer: You can say yes or no, it is both. Let see how it is going further in US, there are lot of meetings happening accross the globe, let see the outcome of those. It may be a good or a bad new for whole world.
In case if the economy comes under the grip of recession again, then the most affected sectors will be the exports sector, it may include textile, software, IT enabled services etc.
Let say if you are working with a  company that exports goods or services to US or the European Union, then your company may face the heat/pressure on orders, and ultimately it affects an individual's job. Because the company definitely will stop the new hiring process as there may be fear of another recession.
But as I said, it is still too early to say about the recession.


Question: How this crisis is different from 2008 crisis?
Answer: The 2008 crisis (also called as SubPrime Crisis) was triggered off by defaults in real estate loans by borrowers with poor credit records, low income and no job security. While the current crisis is all about the government's inability to repay the debt.


Question: Why there is a panic in the stock market?
Answer: Panic in the market is among day traders and brokers who do not bound for a week or a month for returns. It seems the panic will not be for longer period. Indian market falls along with the global market but it is only for short period because the Indian economy seems to be standing on the strong foundation.
The fundamentals of Indian market are very strong and India is strong and growing economy, so no worry with repspect to the Indian market. For longer run it is the best time to invest in the Indian market as it is the world's second most fastest and safe economy.


Question: Hmm, then it seems to be a good time to buy stocks.
Answer: Definitely, it is a good time but invest your money systematically and in planned way. Do not put all your hard earned money at once. If you are investing your money, then invest it for longer horizon.

Following are the points you need to take care before investing: -

  • Before you can invest, you need money. Don't start investing until you have a secure job and six to twelve months of living expenses in a savings account, as an emergency fund, in case you lose your job.
  • Before you start investing, you need a basic understanding of what a stock is, what it means to invest, and how to evaluate stocks.
  • You should have several reasons to buy a stock, otherwise do not buy it.
  • If you have more than Rupees 100,000 to invest, however, individual stocks are generally preferable to mutual funds, because all funds charge fees proportional to the size of the asset. Prepare a small portfolio  start investing on companies having strong fundamentals.
  • Diversify your money, it means, don't put all money in one company. Buy in different sectors like OIL, Banks, IT, Metals, Bullion etc etc
  • Hold for long term.

WARNING: - Just because the stock market has declined by a substantial amount does not mean that it can not decline even further. There are risks associated with investing in stocks regardless of whether you invest in an up market or a down market. You must take precautions with all of your investments. Keep up to date on the news relating to the companies you invest in. Read analyst research that is available to you through your brokerage firm. Consider placing stop loss orders to limit the amount you can lose on your investment.



Question: How will you protect you and your family in recession or say in your bad times?
Answer: Do not get panic, take a deep breath and plan yourself. Indians shouldn't worry as India is a growing economy and you must get job to survive irrespective of what salary you get. Also, Indians have the tendency to invest for future and there kids. So, either your parents must have kept money for you or you yourself have invested knowingly or unknowingly.

Ways to make yourself into safe hands: -

  1. First: Always have emergency funds like liquid money, investments in bulions (Gold/Silver), government funds, fixed deposits etc. You must have access to money (emergency fubds) in case of a layoff or cut in pay.
  2. Second: Diversify your money. If you invest mostly in equities and on one kind of share then it may hurt you economically whatever the company's fundamentals are. ! Don’t have all your money invested in one place. Remember Grandma’s saying "Don’t keep all your eggs in one basket." This is what she meant. Savings, varied stocks, money market, savings bonds are all areas to consider. Also, look to the long term. Don’t sell your stock at the first drop in the market. Patience and vigilance! Watch for a cyclic pattern. Invest in bullion (Gold/Silver), invest in government debt bonds, invest in stocks and it must be diversified.
  3. Third: Our elder and wise people says: Live simply that others might simply live. Don’t live above your means. Be thrifty and conservative. Avoid using credit whenever possible. Put off unnecessary spending until the economy improves. If you and your partner are a two income family, try to live on one of those salaries and bank the other. Not only will you gain wealth, but you will be prepared in case one partner is laid off or experiences a pay cut.
  4. Fourth: Be careful with your credit score. It’s better to have a few older credit cards than several new ones. Pay bills on time and if possible, pay more than the minimum payment. Your credit will improve, you’ll save a huge amount of money, and you’ll pay debts off more quickly.
  5. Fifth: Find a financial adviser you can trust and who has a good history of wise investments. These days, financial matters are so complex that there is no shame in admitting you have no idea what’s going on!  When you are confused or feel like you don’t have a full grasp of the situation, just call your financial adviser and he explains it in simple English or your local language, so that you can make an intelligent decision.
  6. Sixth: During recession, you must dedicate yourself in learning new things. If you are jobless and you have some money than either go for some higher education or plan for some professional certification courses which will add weight-age to your resume and it may be booster to your career, you may move up the ladder and it increases your salary as well.

Saturday, August 6, 2011

Indian stock market crashed on intra-day trading Aug 05, 2011


Aug 05, 2011 was the black friday for indian stock market after year 2008. This day Sensex crashed by 702 points in intraday trading, but at end of day NIFTY and SENSEX was managed to down by 120 and 387 points.
NiftyChart as on Aug 05, 2011

Sensex Chart, as on Aug 05, 2011 

Sectors which was affected most was: -
Sector Points Down by
______________ ______________ ______________
BSE Metals 13061.95 -326.30
BSE Info Tech 5459.02 -223.04
BANKEX 11833.22 -201.58
Capital Goods 12277.80 -201.66
BSE Small Cap -248.00 7815.05
Bank Nifty 10354.50 -182.55


I suggest an investor should keep away from the IT sector, because IT sector affects the most when US market hits. Healthcare could be a safe bet at this time.
I also suggest investor should accumulate the Bank stocks but should not invest all at once in Banking sector. This is because of increased repo rate done by RBI, the repo rate may get increased further. At current levels banking stocks look very attractive for longer run. Also, because of increased repo rate, alo stay away from realty and auto stocks.

As I said, pharma stocks are safe bet at current volatile market, couple of good pharma stocks which are having very good fundamentals and are available at attractive rates are: -


  • Aurobindo Pharma
  • Glenmark
  • Cipla
  • Ranbaxy
  • Ipca Labs


Couple of my favorite stock where you can invest are: -


  1. HDFC
  2. IDFC
  3. SBI
  4. Yes Bank
  5. Larsen
  6. REC
  7. Power Finance Company (PFC)
  8. Coal India
  9. Shriram Transports
  10. S Kumar

These stocks are having very strong management, strong fundamentals and could give you very attractive returns in the longer run. But my recommendation is to put 'STOP LOSS' on each stock you buy. This way you will play safe and wont get surprises even if market crashes.

Current situation is just a situation of wait n watch... Its time for newbie to have an eye in the market and make profit in the longer run...

Tuesday, October 2, 2007

What Is Life All About?


Life isn't about keeping score.
It's not about how many friends you have
Or how accepted you are.
Not about if you have plans this weekend or if you're alone.

It isn't about who you have kissed,
It isn't about who your family is or
how much money they have
Or what kind of car you drive.

Or where you are sent to school.
It's not about how beautiful or ugly you are.
Or what clothes you wear, what shoes you have on,
Or what kind of music you listen to.

It's not about if your hair is blonde, red, black, or brown,
Or if your skin is too light or too dark.
Not about what grades you get how smart you are, how smart
everybody else thinks you are, or how smart
standardized tests say you are.

Life just isn't.

Life is about who you love and who you hurt.
It's about who you make happy or unhappy purposely.
It's about keeping or betraying trust.
It's about friendship, used as a sanctity or as a weapon.

It's about what you say and mean, maybe hurtful, maybe heartening.
It's about starting rumors and contributing to petty gossip.
It's about what judgments you pass and why.
And who your judgments are spread to.

It's about who you've ignored with full control and intention.
It's about jealousy, fear, ignorance, and revenge.
It's about carrying inner hate and love,
letting it grow and spreading it.

But most of all, it's about using your life to touch or poison
other people's hearts in such a way that could have
never occurred alone.

Only you choose the way those hearts are affected, and those
choices are what life's all about.

Today let this rainbow remind your friends and family
of what life is really all about.

Monday, August 13, 2007

Why companies miss opportunities?


Sometimes the more successful companies don't see the biggest and the brightest opportunities in plain sight. It is a research done by Erich Joachimsthalor on companies like Sony and Apple. He examined and find out the reason why it happens.
Sony was once the world leader in music players. In all the 1970s, 1980s, and 19990s sony was leading in its way. And then there was Apple, a computer company that had nothing to do with music. In 2001, Apple brought a revolutionised mp3 product in the market called iPod. Today talk about mp3 player and everyone thinks of Apple. In mp3 player and music download it is the apple story all the way.
Why did Sony not noticed an opportunity that was right under its nose (since is excel in music)? And, how did Apple strike a goldmine that was not even familliar with (that is music).

The correct starting point - The Apple and Sony story teach you few lessons on how companies find opportunities. After the success of walkman, Sony started looking at the world from inside-out. Sony concentrated all their energies on one blockbuster and how to squeeze more out of it.
Apple on the other hand, had a completely different approach. Apple never ever say , "How do we create a music palyer better than walkman" even they did not look at the walkman. Instead what Apple did was study how people live around and manage their music. Apple said, "We need not create another music player and push it down consumers throats by creating a different or better value proposition". Apple did there research on how people manage music , manage video liberaries, manage communications, and see the fundamental behaviors that Apple have to change so that they can creat a value for the consumers. And, that was the atarting point for Apple.
The trick lies in reconstructing a day in the life of a consumer, and this works particularly for new and a breakthrough innovation. Apple did the marketing research to confirm there own perceptions about what consumers want. The reason why apple saw the opportunity in the music business because they are not in the music business ;).

Missing the big picture - Let us come back to the Sony example. The reason why Sony stumbled was because the compay had a different division, so there was a walkman division, a consumer electronics division and so on. The problem with the division was that these divisions remain confined to their little worlds and, rarely stepping out and exploring opportunities beyond their immediate responsibilities.
Take an example of Gillette, which had three seperate divisions: Duracell for batteries, Oral B for toothbrushes and Braun for high end devices. Gillette had all three division but they failed to see the biggest opportunity in the oral care market. It was P&G which entered the oral care category and increased its profit margins beyond its wildest imagination. The interesting and exciting point is that the P&G did not even have the technology to do the spinbrush. They used opensource to get the spinbrush technology. And that's where the difference lies.

Notion of competitive advantage - The classic approach that most of the companies use is, "Let us create a product that is faster, cheaper and better than what a competitor's product offers". All of that effort of competitive advantage is a sucidal game. It leads to product proliferation and commoditisation over time. Customer adavantage is something as simple as being able to identify innovations and the products that will fit into consumers lives, and make a difference to them. That is what Apple did, you can see the customer advantage in the iPod. The idea is to create a fundamentally different consumer experience.

It is not just about needs - Most companies operate from the paradigm called as "Need Fulfilment Paradigm": find a need and fulfil it. This is the basic paradigm of innovation and marketing. It creates a big problem because it causes the marketers to desperately find the needs. So they do surveys and focus on consumer and consumers say they want a product like that, but in the end that doesn't happen.
Instead what Joachimsthalor says something like "ecosystem of demand" - understanding of demand and know how it arises. "When we create innovation, we try to fulfil the need as understood from the consumer perspective other than realy understanding how a needs changes across context."

Think of it - Just think about it, you may drink a different beer when you are out with your friends in the evening, than when you are alone with your wife at home. "Many times you do not buy the things that you need, but instead you buy something just because of a passion or desire." Joachismthalor says, "I don't think that anyone ever bought an iPod because they needed another music device. It was bought for many more reasons."

- An article by Erich Joachimsthalor.

Erich Joachimsthalor is the founder of the strategy and the marketing firm "Vivaldi Partners" headquartered in NewYork city. He is the author of "Brand Leadership" and "Hidden in Plain Sight".