May seem straight forward to Java Geeks.

I thought this would give compile time error. Later on realized the output is
This is funny
Moral: It is possible for a method to have a declared return type and yet contain no return statements.

I know:
For those whose vocation is Programming and you always have the above excuses or hand-cuffs and even then you want to be Eco-Friendly, glance at the titles and pictures. The pictures are dedicated to you.
For all others, I promise it is worth reading and I recommend to follow at least one.
Who is a Green Programmer?
All those people whose job is Ctrl+c, Ctrl+v (I know there is a lot more) and who have already realized that the Beautiful Earth is in danger and are desperate to contribute and follow a set of Eco-friendly rules, are already Green Programmers. The level is based on the number of rules you follow and the number of people you educate. The other synonym is Eco-Friendly Programmers.
Why should I become a Green Programmer?
Global warming, Acid Rain, Pollution, Hazardous waste, Ozone Depletion, etc. These terms are now more practical and live. By becoming a Green programmer, you are first aware of the cause and consequences; and then aware and follow the ways to reduce them.
How to become a Green Programmer?
Apart from following the best practices for programming, there is a simple set of Eco-Friendly practices, which needs a little extra effort. There are a few easy and basic rules defined in this blog and the rest is common sense.
If you have understood till now, you are already a Green Programmer.
Being the Green Programmer:
I asked a question in stackoverflow, "How to be an Eco-friendly programmer?" and I am going to use few of the answers here. For those answers that I got from stackoverflow, Notation is Answer:.
This is not over. There are a lot more that our common sense tells us everyday. Now what are you waiting for? Join hands with the other Green Programmers, follow and spread the word.

References:
| Reactions: |
| Reactions: |

| Reactions: |
Let me prove the same to you, with a simple game taken from The 7±2 Urban Legend.
Game:
Slowly and steadily read the digits in a single row, out loud. At the end of each row close your eyes and try to repeat the sequence of digits back, in the same order. If you make a mistake go onto the next row. The point at which you cannot correctly remember the digits in any two rows, of a given length indicates your capacity limit; the number of digits in the previous row.
Numbers:
5648
2062
8965
54690
78234
35795
195480
052648
235684
6548690
6589209
15984532
05984569
358954092
6154787935
Why couldn't you complete the game?
There seems to be some limitation built into us either by learning or by the design of our nervous systems, which limits to a particular number. Confusions will appear near the point that we are calling his "channel capacity". Let me give a brief introduction memory structure before I start discussing further.
Memory system:
A common model of human memory divides it into two units; a short term memory and a long term memory. The short term memory is a limited capacity store for holding temporary information. The long term memory is usually treated as an infinite capacity store capable of holding information throughout a persons life.
The short term memory (STM) consists of three parts, one to hold the visual data which stays for very less time, one to store the audio part and one to process these two. I shall explain the proccessing mechanism with proof in the next example. Now the question is which part of STM goes into Permanent Memory? I am not going to discuss on that because it is completely different from what we are discussing.
Visual part -> Processing Part <- Audio part
But, I can answer another interesting question. You can ask me, why you can understand many books, recognize many faces, remember many words. But this does not constraint me on a number as small as 7±2.
Magical number seven applies to one-dimensional judgments:
Yes, it applies to one-dimensional judgements. When the activity is changed.
Testing the one dimensional judgement:
If I show you a set of 4 letters on a screen for some time and the ask you to repeat the letters, we can do that immediately. Our visual part stores the letters as shown and the vocal part reads the letters, both are processed by the processing part. If I ask the same letters after 1 hour, we forget. This proves that it is going into the STM. Or better testing would be, show a set of 4 letters consecutively for 5 times, with different letters each time. Remembering them immediately will be easy. But after 10 minutes, we forget. We forget it because it is there in the STM.
Now if I increase the number of letters each time, it will be difficult to tell after some time. This is when we reach the "channel capacity".
The coincidence between the input and understanding is covariance.
It may look like this:
At 4 alphabets:

At 7 Alphabets:
No matter how many alternative letters we take, the best we can expect to do is about 7 different letters without error. Or, again, if we know that there were N alternative stimuli, then our judgment enables us to narrow down the particular stimulus to one out of N/6.
There were many tests that were made. Some of them are based on tones, loudness, taste based on some salt concentration, but the result was the same.
For more than multi-dimensional tests:
When the 3-D space is taken, its totally different. Then there are different things coming into picture. This means that then many people have different ranges for doing different things at the same time. So the results differ. For e.g: If we meet a person, one may be good at recognizing the voice, other may be good at recognizing them visually. The test on this showed varied results. But numerically it was bigger than the one-dimensional one.
This happens because we have different ways of storing information. For e.g: If someone speaks in other languages that we don't understand, we start representing them in English and our STM gives its own representation. So, its easier to hold the information in 3-D space. This is the primary reason why we can recognize a sentence, even if our 1-D recognition is very less than what we assume.
Since the memory span is a fixed number of chunks, we can increase the number of bits of information that it contains simply by building larger and larger chunks, each chunk containing more information than before.For e.g: We hear and then form words and then organize them into large chunks. This is something like representation 9800048486 as 98-000-48-48-6.
Paradox of Choice ( from speeches by Prof. Barry Schwartz ):
When we are exposed to a list of choices, we actually believe that we are having more freedom and hence more satisfied. But experimental results have proved that satisfaction decreases when the choices cross the numeric value (7±2 in most cases). Let me prove this from one of the experiments take from "Paradox of choice - Barry Schwartz". There are quite many but let me put down one.
Jam Example:
Experiment was conducted in Supermarket, as most of the decision making experiments are conducted in Super markets. For marketing the imported Jams, there were 26 choices of jams being placed as samples to be tasted. The offer was, if they buy the jam immediately after tasting, there was 1$ discount. This increased the crowd and some of them bought the Jam after tasting.
The same experiment was conducted after a few days, where only 6 samples were placed and the offer was the same. The crowd was less compared to 26 choices and some of them bought the Jam.
The result (not obvious) was that out of Jams sold from 6 samples, only 1/10 was sold with 26 choices.
There are many reasons why the increasing the choice reduced the sale. Some are:
One solution for making decisions may be categorizing or reducing the chunks. If the 26 Jams are categorized into 6 categories, the choice becomes less and all the above factors come down. Or the second one is to make an agent select the choices or taking the opinion poll. Like we google for the best imported jam and then we find the agent making choice for us based on the opinion of others who have used. Here we are not making the choice, but we are depending on the agent to make the choice. So, the above mentioned factors won't appear.
"We might argue that in the course of evolution those organisms were most successful that were responsive to the widest range of stimulus energies in their environment. In order to survive in a constantly fluctuating world, it was better to have a little information about a lot of things than to have a lot of information about a small segment of the environment. If a compromise was necessary, the one we seem to have made is clearly the more adaptive."
- George Miller
| Reactions: |
A good design is very simple like the nature. Its without any instuctions. Take Tree for example, we need not need any instructions, we see the nature and learn. We learn how to eat fruit or how to climb without any instuctions. So, in the process of representing the nature we started using OOP. There are 2 important terms to be learned before starting with the concepts:
So, the whole problem is removing the invariable from the variable and moving invariable up the Tree. This produces Shallow tree and which is more prefered than a Deep Tree.
For example:
WindowManager:
Here, CreateWindow is variable and EditWindow, SaveWindow and CloseWindow are invariable. Because CreateWindow can be called many times, but the EditWindow, SaveWindow and CloseWindow can be called on a particular instance of Window.
For OOP there 4 mandatory concepts:
Abstraction:
Abstraction is taking the Invariable part out of the Variable. A natural example may be Fruit. Apple exists and once eaten cannot be reused. But Fruit is something that cannot be eaten and that exists only in some form.
Encapsulation:
Hiding the variable part or complexity and implemented using Inheritance or Composability.
Composability:
Composability is very dynamic. Its Composing/Delegating/Ordering. Like someone asks you for time. You see a watch/clock/mobile and then tell time. Here you are encapsulating the implementation, i.e, you are not inbuilt with time functionality. But, you are delegating it to a watch/clock/mobile and telling time. Since there is delegation, its costlier. Most of the times, Composability comes along with Inheritance.
Inheritance:
Inheritance is static. It is Derivation. Let us take the same watch. You see the watch and look into the time. But for a watch mechanic, the encapsulation is different, he looks into the internal parts of the watch. He sees the implementation.
Implementing Encapsulation using Inheritance/Composability may seem confusing. So, let us take another example, say a Data Structure implementation.| Reactions: |
