Saturday, August 19, 2017

Pranayama

The content below is taken from Captain Ajit Vadakayil's blog:

Pranayama is the regulation of the incoming and outgoing flow of breath with retention.  It needs to be practised only after perfection in asana has been attained.  Patanjali expressly advises the sadhaka to perform pranayama only after attaining perfection in asana.   For the first time, he demonstrates a distinct step in the ascension of the ladder of yoga, whereas he has not specified progression for the other aspects.  Normally the flow of breath is unrestrained and irregular. Observing these variations, and conditioning the mind to control the inflow, outflow and retention of the breath in a regular, rhythmic pattern, is pranayama.  The word pranayama consists of two components - prana and ayama.  Prana is energy, when the self-energising force encompasses the body.   Ayama means regulation.  Pranayama— where you exhale twice as long as inhale— is more about dumping old experiences rather than mere oxygenation  of blood.  It is always starts with the left nostril for right handers – for left handers it is vice versa ( no book on pranayama talks about this ) .. Left handed people have their sub-conscious in the left lobe of the brain.Breathe in the new , breathe out the old. Pranayama—inhale and exhale with awareness— long exhales with the sound of  MMMMMMM.    Humming boosts level of nitric oxide—this in turn ups the oxygen intake by 98%, the biggest secret . Ordinary breath is a mere 4%.  It is amazing Nitric oxide was discovered by Indian yogis 11000 years ago.  For re-inventing this a Nobel prize was given 2 decades ago.

Nitric oxide is necessary for-
1. Destruction of viruses, parasitic organisms, and malignant cells in the airways and lungs by inactivating their respiratory chain enzymes.
2. Regulation of binding - release of O2 to hemoglobin.
3. Vasodilation of arteries and arterioles (regulation of blood flow or perfusion of tissues).
4. Inhibitory effects of inflammation in blood vessels.
5. Hormonal effects. Nitric oxide influences secretion of hormones from several glands (adrenaline, pancreatic enzymes, and gonadotropin-releasing hormone)
6. Neurotransmission. Memory, sleeping, learning, feeling pain, and many other processes are possible only with NO present (for transmission of neuronal signals).

Obviously, during mouth breathing it is not possible to utilize one's own nitric oxide which is produced in the sinuses.  The mouth, was created by nature for eating, drinking, and speaking.  At all other times, your trap should be shut.When there is lack of oxygen in your blood , you living to a small percentage of your potential. Endurance exercise can increase oxygen utilization from 10 to 20 times over the resting state. This greatly also  increases the generation of free radicals, which can cause cancer.  Metabolism, or, more accurately the metabolic rate of the cells, sets the demand for oxygen. At rest, a human consumes about 250 millilitres of oxygen each minute. With exercise this rate can be increased more than 10-fold in a normal healthy individual, but a highly trained athlete may achieve a more than 20-fold increase.. Muscle can do more work, but beyond the aerobic scope they must revert to anaerobic metabolism, which results in waste products, mainly lactic acid.  The ability of the eye to dark-adapt (, increase its sensitivity at low light levels) decreases with age, but part of that decrease can be restored by breathing pure oxygen. Various mental processes in old people are also found to be improved by breathing oxygen. Any slowed induction of protein synthesis, as from lower oxygen intake, with age is a factor in the deficits of learning and memory of old people. 70% of toxins in your body are released by exhalation— rest by sweat, defecation and urine— surprised?  Oxygen drives the basic metabolic processes that permit growth and constant body temperature. The main purpose of respiration is to provide oxygen to the cells at a rate adequate to satisfy their metabolic needs. This involves transport of oxygen from the lung to the tissues by means of the circulation of blood. The precise object of respiration therefore is the supply of oxygen to the mitochondria.  Ganges' self-purifying quality leads to oxygen levels 25 times higher than any other river in the world. Ganga, show that it is able to reduce BOD (biochemical oxygen demand) levels much faster than in other rivers. Ganges cleans up suspended wastes twenty times faster than other rivers on the planet. The power of breathing lies in its relationship with your energy source. The mind is intimately connected to your breathing. Deep breathing triggers the lymph, your body’s sewage system which will give your cells more efficiency. It keeps the blood fully oxygenated. Breathe in the ration 1/4/2.  .The physical aspect of lack of oxygen in the body is not as important as the mental and spiritual aspect.  Lack of oxygen always slows your reaction time. The more oxygen our brains receive the better they function. Glial cells are mediators between the neurons and blood vessels of the brain. Oxygenating the brain can slow down constant die off of brain cells, and can activate areas of the brain which usually idle from lack of blood. The cells you use the least are the first to die off. 35000 brain cells die every day—more when there is lack of blood. But don’t worry, you have a stock of 100 billion brain cells. Arterial blood is slightly more acidic in pH value ( 0.05 ) than the venous blood. Blood is an electrolyte. Blood is a carrier for oxygen and nutrients to the cells, but more fundamentally it is a carrier of electrical current. The movement of blood produces EM waves through changes in the electrical charge (voltage) and current (amperage) of the fluid.  Because oxygen is vital to life, the body and brain are extremely sensitive to even very small reductions . This is why exercise must be done at least ONE hour after a meal or oxygen required for digestion is used by muscles leading to indigestion and cramps. Stress, fear and anxiety causes muscles to contract and blood vessels to constrict. When blood cannot be transported freely through the body to provide oxygen, and antibodies and to carry away and dispose toxic wastes, illness sets in. Mind is non material , but it works in partnership with communicator molecules. With every thought mind moves atoms of hydrogen, carbon , oxygen and other particles in the brain . Knowing the connection between breath and consciousness, the ancient yogis devised PRANAYAMA to stabilise energy and consciousness. All that vibrates in this universe is the cosmic personality and prime mover Prana, potent in all living beings and non-living beings --- heat, light, gravity, magnetism, vigor , power , vitality,life, spirit.   When a man is contented and happy , he has more Prana inside him. Anxiety vanishes entirely when you are one with the rest of the universe. When your mind is disturbed the fundamental energy Prana leaks . Pranayama just reverses the process.  Yoga says that longevity depends on slow deep diaphragmic breathing. A tortoise takes 4 breaths a minute and so lives more than 200 years. People who do Pranayama regularly have quieter nerves , less lethargy , better sleep and lower BP.  It prevents accumulation of Uric acid which gives joint pains. Fluctuations of mind are controlled and hence Pranayama prepares you for meditation.


The benefits are:--
1)  You raise your consciousness
2)  Develop inner peace
3)  Rekindle your drooping spirit
4)  Detoxification of body and mind
5)  Your face glows --balance of mind, body and spirit.
6)  Mental clarity and concentration
7)  Raise your immunity
8)  Reduces biological age.
9)  Centring yourself and stoking your inner flame
10)  Gratitude and communion with self
11)  Awakening at cellular level, improves metabolism, burns fat
12)  Expansion of perception
13)  Physical exercise , stretching, flexing of spine. Removes stiffness of joints and ligaments.
14) Destress.
15) Good sleep at night.
16) Miraculous delivery from disease -physical and mental.
17) Your skin is cleansed by sunlight and you have less BO. Clears eyesight too.
18) Improves body posture.
19) Drives away phobias.

The  HYPERVENTILATION ( Sudarshan Kriya ) patented by Triple Enyme Sri Ravsihankar made evil pharma very happy ,for it made people fall sick.  

VEDIC YOGA SUPPORTS ONLY DEEP DIAPHRAGMATIC BELLY BREATHING AND NEVER EVER SHALLOW CHEST HYPERVENTILATION, AS PATENTED BY SUDARSHAN KRIYA / SOHUM . . 

YOGA HAS SHUNNED HYPERVENTILATION , AND HAS USED BHASTRIKA PRANAYAMA ONLY TO SHIFT THE DOMINANT NOSTRIL ( IDA/ PINGALA ) FOR A FEW SECONDS. . .

Human brain cells degenerate and die when you do hyperventilation. This is irreversible. . Hyperventilation leads to spontaneous and asynchronous firing of neurons . .. Brain diseases (or disorders of the central nervous system - CNS) are possible only in conditions of chronic hyperventilation, chest breathing and mouth breathing. . . Most brain diseases are characterized by chronic hyperventilation, there are additional effects due to low CO2 levels in the CNS. . .If excess ventilation cannot be compensated metabolically, it will lead to a rise in blood pH. This rise in blood pH is known as respiratory alkalosis. . .When hyperventilation leads to respiratory alkalosis, it causes dizziness, tingling in the lips, hands or feet, headache, weakness, fainting and seizures. . .In extreme cases it can cause carpopedal spasms (flapping and contraction of the hands and feet). . .Your body relies on carbonic acid to regulate the acidity of the entire bloodstream. By hyperventilating you remove far too much CO2 from your blood. . .The acidity of your bloodstream falls as a result. This has all sorts of nasty effects on your body if it is sustained, not least of which is an interference with nerve transmissions. . .Hypocalcemia, which results from hyperventilation, can cause tingling sensations, spasms of the muscles, and even convulsions. . Hyperventilating DOES store extra oxygen. But you can't necessarily use that extra oxygen, because with low CO2, your blood becomes too alkaline. . .Hemoglobin, in an alkaline environment, doesn't want to release the oxygen bound to it. . .Hyperventilation leads to MARTINI EFFECT and NIRTOGEN NARCOSIS.. Nitrogen narcosis is a neurological impairment caused by excess dissolved blood nitrogen . . Hyperventilation immediately causes a changed state of consciousness albeit a FAKE one . Many old people while doing hyperventilation on their beds have died . ..When a person hyperventilates, lowered level of carbon dioxide causes the pH of the blood to increase, leading to alkalosis. . .Yoga increases GABA levels in the brain . Low GABA levels are associated with depression and Alzheimer’s disease. . .Hyperventilation is NOT yoga.  Do NOT do too much kapabathi-- you will get inguinal hernia!Swara Yoga is the science which is about the realization of cosmic consciousness, through the awareness or observation, then control or manipulation of the flow of breath in the nostrils. Shiva answers Parvati's questions ( Vigyan Bhairava Tantra) patiently and fully and goes on the tell her all about swara saying that "for all beings, breath is only the base." These include techniques for managing the planetary effects and the moon's phases and avoiding the negative influence of the planets and astral forces, through altering the breath flow or swara in the nostrils, manipulating and controlling the breath or the breath flow through each nostril. While on the subject of effect of moon on women, some Chutney Marys attacked me –so some ancient secrets will not be revealed and are now lost forever. By swara yoga you can even choose the gender of the baby you want.  I guess signs tell us what happens for the best.



We can alter our destiny by  being more auspicious, and realising, and eventually attaining the harmony and the Highest Consciousness. Swara yoga is an ancient tantric science which involves the systematic study  of the breath flow through the nostrils (or swara) in relation to the prevailing phases of the moon, time of day and direction . Although we think of 'pranayama' when we think of techniques associated with the breath, in Swara yoga, it is the association of the breath in relation to the activities or phases or positions of the sun, moon, planets, seasons, time of day, with the physical and mental conditions of the individual and then taking the appropriate action according to these subtle relations. It was kept as a closed secret by the ancient sages and saints who had intuitively received this knowledge from the Divine. Swara yogi knows that during the flow of left nostril or right nostril when favorable elements rises certain things can be undertaken if you want to be successful. There are three modes of breathing- flow from left nostril, flow from right nostril and flow from both the nostrils. The last mode is generally for a short duration when breathing switches from left to right and vice versa.  Mode of breathing can be checked by examining air flow while exhaling. All our actions can be classified into three main categories; physical, mental and spiritual; which are respectively presided by the above three modes of breathing.  Breathing through the left nostril ( ida nadi ) stimulates the right hemisphere of brain, and breathing through the right nostril ( pingala nadi ) stimulates the left hemisphere. Breathing through the left nostril is connected with higher intraocular pressure and breathing through the right nostril lowers that pressure Intraocular pressure  is created by the continual renewal of fluids within the eye. The intraocular pressure is increased in glaucoma. Breathing through the left nostril stimulates Ida which relates to the moon and the parasympathetic nervous system, breathing through the right stimulates Pingala, relating to the sun and sympathetic nervous system.   Ida nadi is associated with the rest and restorative system of the body, whereas the pingala nadi is associated with the fight and flight response. Pranayama starts with the left nostril always. The benefits of left nostril breathing are numerous including sharper, clearer focus of the mind, and a deep, full relaxation or sleep.  In the Yogic tradition, left nostril breathing has been used to break vices and habits, which usually take 21 days  . If you watch your breath you will find that it is usually flowing more in one nostril than the other. Again, if the left nostril has a greater flow of air, then ida nadi is predominant. When the flow is greater in the right nostril, then pingala is predominant. If the flow is equal, then sushumna is ruling. When the right nostril is flowing, then vital energy is more active, allowing the individual to do physical work, digest food and so on. The mind is extroverted and the body generates more heat. When the left nostril (ida) is flowing, mental energy is dominant, the mind is introverted, any kind of mental work; thinking concentration, etc., may be undertaken. Ida nadi also flows mainly during sleep. The primary aim of hatha yoga is to bring about a balance of flow between the prana in ida and pingala, (ha = sun, tha = moon). To do this the body is purified by the six techniques known as the shatkarmas.  As per swara yoga, in a day the flow of air through the left nostril should predominate for about twelve hours and through the right nostril for the other twelve hours. If pingala flows, the body will be restless; if ida flows, the mind will tend to think too much. In human physiology, the two nadis correspond roughly to the two halves of the autonomic nervous system - the sympathetic and parasympathetic. Pingala coincides with the sympathetic nerves, responsible for the stimulation and acceleration of activities concerned with the external environment and the deceleration of the organs which tend to utilize a lot of energy internally. The sympathetic nerves speed up the heart, dilate the blood vessels, increase the respiration rate, and intensify the efficiency of the eyes, ears, etc. The parasympathetic nerves directly oppose the sympathetic nerves, for they reduce the heartbeat, constrict the blood vessels, and slow the respiration so that the individual becomes introverted. The flow of prana in ida and pingala is completely involuntary and unconscious until yogic practices control it. A Swara yogi realizes cosmic consciousness through control and manipulation of breath. The ancient 7000 year old Sanskrit texts mention 72,000 subtle channels through which prana flows, the dominant flow of prana occurs within the ida and pingala nadis, two channels that course upwards on either side of the spine from their origin within the kanda or ‘bulb’ in the sacral plexus. The ida and pingala nadis relate to the activities of the parasympathetic and sympathetic divisions of the autonomic nervous system, respectively. Surya Bhedana when breathing in through the right nostril and Chandra bhedana when breathing in through the left nostril. Breathing in takes air down to the lungs which will produce suction in the eustachian tube. Scientists have postulated that external forces set the biological clock by stimulating the pineal gland, which is affected by dark/light cycles.  These rhythms which were previously known to the ancient Rishis, so man is actually only rediscovering himself in relation to the cosmos. By the practice of Swara yoga one  can become the master of the nadis and elements, so as to adjust himself with  the universal forces which is the source of everything that gives birth to the experience of both  material and spiritual life with heightened awareness.  As per Swara Yoga , different modes of breathing leads to different types of actions; physical, mental and spiritual.   Swarodaya Yoga’ has three types of breathing systems – For a right hander  Ida (Inhaling and exhaling from  left nostril ), Pingala (inhaling and exhaling from right side of the nostril) and Sushmana (inhaling and exhaling from both sides of the nostrils). We mostly breathe in and out from either Ida or Pingla but sometimes we breathe from both the nostrils.  The Sushumna mode is generally for a short duration when breathing switches from left to right and vice versa.  Mode of breathing can be checked by examining air flow while exhaling. Compliance to the dictums of ‘Swar Shaastras’ is more efficacious than omens, and a suitable time selected through astrology based on moon and planet phases. it was used to go beyond the limitations of the mind.

One must change mode of breathing suitably at the time of initiating specific desired activity. Example: When the left nostril is running (for righthanders ) , intitiation of mantras and consecration of deities in temples is done. When the right nostril is running certain deadly and destructive vashikaran mantras of Atharva Veda and psychic works are done.  I will only say so much. Swara yoga aims at directly awakening the highest human potential. . Swara Yoga is a path which leads to awakening of the entire being.

Sunday, November 8, 2015

Rooting android and executing Super commands

Android 4.4.4 has introduced additional restrictions to turn on GPS/internet programatically. My requirement was to auto flip GPS/internet connection.
With Android 4.4.4 security restriction the android.permission.WRITE_SECURE_SETTINGS would stop the code to flip gps/internet connection. I managed to get around by rooting and following few simple steps:

Steps required to take:

1. Root you Android phone (Note: the warranty of the phone will be void once you root it also do backup data just in case mobile gets bricked)
  Rooting basically means to gain complete access to modify mobile settings at system level. 
  Download and install KingoRoot from here

 Note:  There is an android APK also for rooting, but it didn't work for me, so better to use windows desktop version.

2. Open KingoRoot desktop application and connect your Android device( ensure USB debbuging is turned on  follow link if not)

3. Follow instructions on KingoRoot desktop application and the mobile will have KingoROOT and Superuser APK installed after the mobile gets rebooted. At this stage, the root access is available to KingoRoot and can be given to other APKs who request it.

4. The user apps can now run commands to remove security restrictions: Some command i ran programmatically to remove GPS/internet flip restrictions are below:

a. "pm grant " + context.getPackageName() + " android.permission.WRITE_SECURE_SETTINGS";
b. "settings put global mobile_data 1";  // to enable=1 disable =0 mobile data
c. "svc data enable/disable";   //to enable/disable mobile data incase a. doesnt work.

The code used to run above commands from Android is below.

public static void runAsRoot(String[] cmds) {
try {
Process p = Runtime.getRuntime().exec("su"); // this give super user access
DataOutputStream os = new DataOutputStream(p.getOutputStream());
for (String tmpCmd : cmds) {
Log.i(TAG, "Calling root command : " + tmpCmd);
os.writeBytes(tmpCmd + "\n");
}
os.writeBytes("exit\n");
os.flush();
} catch (Exception e) {
e.printStackTrace();
}
}


Thursday, July 9, 2015

Cordova hurdles


Cordova setup steps (windows 7 + Android):

Pre-requisites
1. Download npm here  and setup. Its a package management tool to install cordova.
2. JDK 7
3. Android emulator or device. Ant might be required for older versions. newer version use gradle build system.

Setup cordova CLI (command line client)
1. From DOS prompt run >npm install -g cordova@x.x.x
Note: cordova specific version can be installed using x.x.x eg: 5.0.0 or remove it for default latest version.

Create Cordova project
  1. cordova create directoryName com.package AppName
  2. cd directoryName
  3. cordova platform add android@x.x.x
  4. cordova plugin add
  5. cordova build android/ios --release
  6. cordova run android/ios --device

Setup on eclipse
1. Follow blog
This is still work in progress... Will share once it is done.

Debug
Add Debug Console plugin to your project by running this command:
$ cordova plugin add org.apache.cordova.console
To see debug output adb logcat CordovaLog, but generates too much logs.

Or use remote debugging http://jsconsole.com/remote-debugging.html (way better logs)

Gotchas
  1. cordova build command first time downloads gradle. On cordova 5.1 had issue downloading it, the fix was as below :
    1. Stackoverflow link
    2. update ..\platforms\android\cordova\lib\build.js (search for .zip and replace to ../[].zip)
  2. Cordova plugin are downloaded from npm package (like maven). 
  3. aidl files failed to compile :  fix
aidl -I/Volumes/work/projects/java/android/cordova/hello/platforms/android/src -p/Volumes/work/projects/java/frameworks/android-sdk-mac_x86/platforms/android-22/framework.aidl IInAppBillingService.aidl

4. Android API 16+ requires JDK 7+ only. And mac Snow Leopard 32 bit doesnt support JDK 7 anymore (ridiculous). Mac is such a waste of time when it comes to backward compatibility.



5. I am yet to figure out how to run cordova(newer projects) from eclipse. Running from CLI is fine, but how can we debug like logcat in eclipse Juno?


6. The cordova.js ,cordova.jar and cordova_plugin.js are generated under \platforms\android\build\intermediates\assets\debug\www\cordova.js
Note the way plugins are included in later version of cordova is through JS.
7. To rename app : http://www.stefangordon.com/renaming-your-cordova-application/


Ionic

https://ionicframework.com/docs/intro/installation/ 1. npm install -g ionic cordova 2. ionic start letsgo-mobile blank 3. cd letsgo-mobile 4. ionic serve




Tuesday, August 19, 2014

Automation in agriculture/gardening - Drip irrigation


Given :
 Water is required by plants(roots only),
When :
 The traditional way of putting water using hose pipes
Then
  Water and energy(electricity) is wasted

Solution:
  Drip irrigate the plant roots like human circulatory system (network of pipes - remember to use T-bends at 90 degrees to avoid lag in flow).
  Reuse existing overhead tank to circulate the water into this system. (Overhead tank uses gravity. Fill this tank when sun shines using a solar powered water pump to make it self sustaining)
     -Also can add a rain water harvesting system
  Connect automatic timer on the tap to irrigate water on certain times of day/month/year
  Sow the seeds and enjoy self sustaining flower and fruit plants.
 
  Scale it to a farm!

Exceptions 
  Cost of building overhead tank (reuse existing tank or water tap)
  Clogging of pipes (needs maintenance)

Practicals
  This i will try and post in detail when in India.
 
Links:
  Drip irrigation timer only on Alibaba or ebay(buy pipes and connectors in local shop to save Rs.) :
 
 Pls leave a comment if you find it useful. That would keep me motivated :)

सर्वे भवन्तु सुखिनः
सर्वे सन्तु निरामयाः
सर्वे भद्राणि पश्यन्तु
मा कश्चिद्दुःखभाग्भवेत्
शान्तिः शान्तिः शान्तिः ॥  meaning

Wednesday, June 18, 2014

Preparing for a Solar adventure (Solar PV based systems)

"I am bored of software" Its all virtual in the mind, no concrete matter. Hmmn.. I am thinking of building a hardware system(solar PV based farm) :)
I aim to blog here my findings as i venture into the Solar adventure and open source all the knowledge gained in the due course.

With the solar energy based electricity production catching up in Germany and other western countries, I have been thinking for a while the best way to get into this space to contribute and monetize by setting up a self sustainable business as sun light is abundant in India.

Germany seems to be leading in the solar energy space (They call it Energiewende  or energy revolution). This revolution seems to be because of rising energy prices(as they were major importers of electricity), the Fukushima nuclear disaster and government policy to give good feed in rates for energy producers. 


Given
   India has temperature of  around 25-40 degrees around the year
   Solar PV panels cost have reduced drastically (0.4 to 0.7$/w)
   Indian Government has solar feed in tariff with net metering(in Karnataka) at subsidized rates
   Current goverment has backing for solar energy (considering Gujrath's model)
When
   Solar PV based system are setup as farms or on roof tops
Then
   Electricity can be generated and fed into existing grid. With two way net metering we can run the meter backwards. Carbon footprint can be reduced and a small profit made

Exceptions and unknowns
   Power companies like BESCOM might be unwilling to pay the rates and provide net metering(considering corruption in govt offices)
   Risks like fire disaster or grid tie cut off (when main grid is turned off, the unit should stop supplying power so the line man doesnt get electocuted etc ) need to be evaluated
   What if feed in tariff gets reduced drastically by government?
    Profit need to be computed:

Estimated Profits 
  Ingredients
    Solar panel  at say 0.5$/watt = Rs.25/watt a 10kwph system would cost : 2.5 lakhs
    Micro inverters (per panel inverter is better than one single inverter)
    Net meter , wires and other components
    Labour
    Land
    Permission from electricity board
 Profits
   Feed in tariff rate say Rs.12/kw . If a 10kw system runs say 10 hrs/day produces 100KW in a ideal scenario. So earning is around Rs.1200/day on a good day?? Roughly one can make Rs.30,000( $600) a month with 10kw unit (considering the feed in tariff rate is real)?? 10% returns
Note: these are rough calculations and might be wrong. will update once i get the system in place and start earning in real from these power companies.
 
Hmmm, so I need to buy the ingredients. The most important being solar panel. 2 options - Mono or poly crystalline. Mono is expensive and compact than Poly.

A Report on Design Estimation of 1MW Solar PV Plant (Utility Scale) with potential earnings is here 

The Government policies (in India)
  • Subsidy : The Ministry of New and Renewable Energy (MNRE) provides up to 30% capital subsidy for roof top systems (off-grid)
  •  Tax breaks  A company can claim 80% accelerated depreciation in the first year of installation under section 80 IC of the Indian Income Tax Code, leading to savings on income tax.
  • Renewable Purchase Obligations (RPOs) and Renewable Energy Certificates (RECs) - Under the REC mechanism, developers are eligible to receive one certificate for every 1,000 kWh of renewable electricity fed into the grid 
  • Net metering Until May 2014, four Indian states: Gujarat, Andhra Pradesh, Uttarakhand,
    Tamil Nadu and West Bengal have finalized the net metering policies. Another
    four states: Delhi, Kerala, Karnataka and Punjab have net metering policies
    in a draft stage. In Gujrath the roof top FiT price is Rs.11.21/kWh and Rs11.78/kWh


Solar PV companies in India:
  Solar panel supplier list  http://www.enfsolar.com/directory/panel/India
    http://www.evergreensolar.in/index.php  (Tamil nadu based)

Useful links
  1. BRIDGE TO INDIA is launching the INDIA SOLAR NAVIGATOR. This online, analytical tool is designed provide you with up-to-date, in-depth business insight on the Indian solar market.
  2.  Bridge to India - The India Solar handbook : download pdf

Thursday, June 12, 2014

When agile becomes Fragile

Its been a while I blogged, probably i got lazy or too busy with other things after getting married :).

Lately I was involved in a project where the so called scum master/monkey advocated and promoted Agile practices to his bosses overseas probably to get apprised, but wouldn't practice it in his own team. Probably his lack of enthusiasm, insecurity or his ways to get on top of the corporate ladder by pushing others down. God only knows. It did annoy me and can see clearly the team was getting disintegrated and drowned in misery.

There was no tester involved, no business analyst to communicate or document requirements/backlog(we had to produce the backlog and code and test and release and communicate to business and take the risk of getting something wrong as we were doing multiple roles). Just another Dev ops dude Y and me figuring out how to deal with things - digging legacy code/building the new messaging pipeline/ reverse engineer the data model/ liaise with teams and what not. This was not scrum. Just adhoc. The scrum monkey would as well shamelessly admit being a Hippocratic. It was absolute shambles - me and Y (who could spend only some time on this project as he was pulled into another project by the so called scrum monkey). I did mention him several times to get another resource and a tester, but he would simply brush it away. And with his crooked ways would ask for the build result without being involved in the design or build process and would like to take the credit when the boss would make an occasional visit? Also on the other side there was a tech ops/support team trying to coax me into dealing with their stuff applying Social engineering skills/Behavioral science/Jingoism. Well one needs to learn moral science  first and do their duty instead of troubling their colleague who is doing his job.

This was so unnatural and demotivating. Obviously good developers would run out of choice and  move on at this stage, so am I. I can see others following. One dirty fish seems to spoil the pond.

So as usual i asked Google god (our digital god who answers our prayers with search results), Why?

1. Basically we were ending up doing Cowboy coding with the boss only interested in the results - doesn't matter how you do it. And he would pull the resource to do other tasks than the main goal.  An undisciplined scrum master who doesn't care for his team but only the outcome by simply not pulling his weight.

Refer http://www.agilebuddha.com/agile/agile-is-not-ad-hoc/


2. Happiness Metric is something a scrum team should always consider along with retrospectives followed by its implementation. After all a motivated healthy and happy team will always produce good result. This does seem like the natural way of doing things.
Refer http://scrummethodology.com/happiness-metrics/



Digression
My miseries and rant apart. Let me think what was going wrong here.

Ongoing maintenance and build over legacy application is a challenging task especially with so many technologies involved built by several different minds over time. The tech ops team struggle to understand whats going inside when something breaks while the dev team struggle to build over legacy apps as there are no regression tests.
Both team need to co-exist to be an ideal Eco-system.

1. The tech stack builds up with many new technologies(Java and its loads of relatives, Mule, ESB, Oracle, Linux) and functionality while the older technologies(C, VB, websphere, messaging, Sybase, Solaris) and functionality haunt the developers. It is like renovating an old house, and the builders waste get expensive to be cleared and affects the new building blocks.

2. The old process and the new process need to match up. The bosses expect the migration to be done somehow.

3. The programming mindset - Stored procedural programming vs Object oriented programming mindset is hard to change IMHO. After years of PL/SQL programming ones brain gets hard wired to its style. As industry moves to OOP technologies like Java there needs a shift of ones thinking which has a hard learning curve involved.

4. As developers move out of team for grazing into greener pastures - there is a huge loss to the team. The new comers are left with no choice but to reverse engineer the code to understand the functionality as the docs might not exist or tend to get obsolete. Moreover the flat documentation can never be as complete as the relational application code. The code is the only source for latest functionality.

5. Working with the existing complex data model can get harder with time if no good process is followed.Also applications cross referencing database tables make them more tightly coupled

But there is no real process for that defined in Agile afaik for a moving target (for porting legacy apps along with ongoing maintenance ). From the bosses point of view Agile might mean getting things done fast with less resource so one can secure a bonus or promotion fast.

Hmmn thats how corporates work isn't it or am I being too pessimistic?

A similar pattern i could see in the past with another media company and could see stressed out developers and tech ops. Someone was not pulling his weight or there was no one to see the big picture and steer/guide the team(perhaps an Architects role) or was there a lack of process for this moving target?



More later...

Thursday, January 10, 2013

iPhone/Android source and monitization

Some websites to buy iphone/android app source or components from:



App monetization:
1. Interstitial Ad(full mobile): quite annoying for user, but better revenue than banner ads for authors
     Chartboost
     Revmob - earnings were good on first day only

2. Banner ads
   Adwhirl is best as a free mediation layer for many ad networks like below
   Admob - average eCpm(0.2 - 0.9). Fill rate 90%+
   iAd(ios only) - good eCpm . But fill rate is lower
   Millenial media - low eCpm (0.2). Fill rate is good.
   inMobi - good eCpm(0.7). Fill rate is 60%
   Leadbolt - low eCpm(0.2) so far

eCPM = effective $ earned per 1000 requests.   [ (earnings/impressions) *1000 ]

Mostly eCpm varies on country of Ad request, rating, etc.

3. Paid app (usually lite and a paid version should be released)
4. Free app with paid in-app purchase after some usage.

   

Monday, August 6, 2012

Hardware/Software stack:
 iPhone 3Gs having iOS 5.1.1(latest as of today). 

The Xcdode 4.2 failed to detect this iphone as it has support only till SDK 5.0..

[UPDATE]
 Follow this : http://stackoverflow.com/questions/9614918/xcode-4-2-snow-leopard-and-ios-5-1
Copy few ios 5.1 folders/version.plist/SDK and you are ready

The below steps will mostly not work. Too many to tackle.. Best go with the link above..tada
--------------

I had 2 choices for getting iPhone ready for development:

1. Upgrade Xcode to 4.4
       - This was not possible as Xcode 4.4 would only run on Lion or more (i have snow leopard which i thought is pretty new ,,but no you need the lion) . So had to drop this option as it was too much effort and setup for new OS..

2. Downgrade iPhone iOS 5.1 to 5.0 or less
        - Had to look around for jailbreaking iphone . But no luck using iFaith, redsn0w.
        - iFaith 1.4.2 runs on windows support SHSH extract till ios 5.0 only. But as i did not had shsh saved. I was literally screwed. Googled more, then found TinyUmbrella5.11.01 had support to extract SHSH from 5.1 . With a catch - in advanced tab uncheck Request SHSH from cydia - very important.
If you not uncheck you get the below error:
05/21/2012 17:10:21.796 CYDIA DOES NOT HAVE YOUR SHSH FOR iPhone3GS 4.3.5 (8L1) THERE IS NO WAY FOR YOU TO GET THEM. SORRY. YOU ARE JUST TOO LATE.

Then got the SHSH for 4.1 from TinyUmbrella. I had an SHSH for 4.1, using it i downloaded the IPSW (the iOS) file from iFaith --> Download from server..

So far so good, it is downloading IPSW for 4.1 SHSH file.  

Hope these steps saves time for someone stuck with iOS 5.1.1 as I spent almost 10 hrs figuring and downloading softwares. 

References:

Glossary:
SHSH blobs  -  Hash signature system (Signature HaSH blobs) to control manual software downgrades on iPhonesiPads, and iPod touches (using this we download IPSW file from iFaith)
IPSW file - iOS package i think
iFaith - Tool for downgrading iOs 5.1 to 5.0 or less
TinyUmbrella - Tool to extract SHSH (details below

Friday, June 29, 2012

iphone Game development - Game ON

To realize my dream of awesome game development(iphone for now), I am posting my learnings here so its easy for anyone interested to get started:

Tech stack for game development:
  - Mac laptop (running Snow leopard. Intel based only)
  - Xcode - IDE like eclipse
  - Cocos 2d : gaming engine library (built on top of C based open gl )
  - Box 2d : physics engine(optional)
  - Objective C : much like C++ progging language
  - Graphic designer (hire a freelancer)

Other:
  - App store account ($100/ year registration)
  - Provisioning profile (kind of license which should be there before deploying to app store)
  - Motivation : money, self satisfaction, something i can give to the world and keep my self engaged

Risks:
    - Initial learning curve. Best to follow some samples and get the basic stuff running to avoid disappointment
    - Game ideas can be copied. You will quickly loose revenue
    - Users may not like the game if its paid. (So release free with ads + paid)
    - Is it worth the time and money?
    - Stress, work life balance? (No pain no gain)

Learn Cocos2d
    Justin Dike tutorial (best material for starters)
    Sample game starter kit  (paid, but i think its worth it)

If you are here and have similar interests and want to join me in designing awesome games, please give me a shout. Group learning and coding is fun

Thursday, June 28, 2012

Ibastis mappings

Gotchas with Sybase
1. Getting error 'JZ0SM: Unsupported SQL type 0'

I've not seen Sybase require this, but DB2 needs the type for null

values.  In general it's a good idea for portability.  MySQL is a

little loose with what it accepts, for better or worse.

2.  If you are using jconn3. driver, ensure you set the sybase jdbc url with
    &DYNAMIC_PREPARE=true
Without this jdbc query may silently fail even with precision errors.

More http://old.nabble.com/ibatis---Sybase-String-problem-td22554502.html


Wednesday, June 13, 2012

jQuery - take 2

Its been a while i used jquery + javascript (mostly into boring GWT as it takes ages to convert java to script)

Lucky i got back into jquery work now. Will be posting more findings here. This post will be dedicated for all the good jquery plugins i evaluate

The good thing about jquery is its plugings which can be easily integrated. But the question is what is the best of the lot and its version compatibility (as some cease development or are hobby projects ):

Jquery tools: Tabs + validator + tooltip + date inputs (the usual requirements - all in one) - ceased development, but saves you from looking around for handling these features.

Blackbird : Debugging console for jquery. Look no more for debug tools as its the one. Its like log4j with console.





Tuesday, June 5, 2012

Mobile app mania - Phonegap vs Titanium

Sandeep: want platform independent Mobile apps?
Sandeep: Trouble trying to build interface for different mobile platforms
          - iOS - bitten by enigmatic xcode UI designer
          - Stuck with android complex xml for simple UI layout
?
God: Use HTML + css for frontend.. with phonegap plugin to call the native API.
Trade off: No native look and feel. but HTML +css should do most of the time

Choices: Phonegap or Titanium
Have used phonegap, but limitation is that it is browser based and only one web view so cant do cross domain site based apps. [edit: There is a child browser plugin for that]
yet to figure out how titanium works(though it sounds promising for native view)

Here is some comparison to start with:
http://developer.appcelerator.com/blog/2012/05/comparing-titanium-and-phonegap.html

And man started creating platform independent apps ...ha ha haah

Friday, April 27, 2012

Scotland scientists

So many amazing scientists were born here

Some I know
Alexander Fleming - Pencillin
James Watt - steam engine
Alexander Graham Bell - telephone
James maxwell - mathematician
John Napier - mathematician
Sean connery -sherlock holmes creator Conan Doyle


Monday, April 2, 2012

Mobile Ad Services (adwhirl)

Apps are the current market buzzword esp. with explosive smart phone sales.

A developer can earn some side income by releasing value add apps for free and integrating a small ad. A few learnings on ad revenue so far(more to come)

- You can generate better revenue if your ad request are filled (fill rate) and eCPM($ earned per thousand impression) will be improved.
      - Ad networks use some algorithm to decide if it has to serve the ad or not which impact the fill rate. 
      - I think if the click through is high, then that will impact the fill rate, etc
      - The aim should be to improve the fill rate

- To increase your fill rate, you would need to integrate with serveral ad networks (admob does it behind the scenes, millenial media does provide integration with just a few networks, but still their fill rate is quite low)
- Adwhirl can be a good option to increase fill rate and reduce dependency on one single ad provider.
      -Adwhirl is an opensource ad integration library which fills this gap of using multiple ad service networks for the  
        same banner. It is a one stop shop to integrate most of the ad networks. Moreover it is opensource, hence you
        can virtually implement any ad network.
      - % of ad to be served can be controlled in their site(this is retrieved using their free mediation server. How nice of them, it is all for free :) )

Gotchas:
1. Adwhirl needs other ad service provider libraries in the class path.
2. Adsense needs additional parameters like company name, app name etc.
3. A mediation server is run by adwhirl.com for free which provides configuration (about what % of ad service to use etc). You can optionally run your own server if required
4. Adwhirl is a loosely couple integration and relies on third party libraries, so have to test that the ad is served individually.



Friday, November 18, 2011

Logo

Logo do matter as it is the first impression created by your app

Couple of options:
Online logo generator: (Most claim to be freee, but they are not..pay $blah..)
1. Freelogoservices.com (have good collection of logos. but its paid service -  £29 for unlimited logos).

DIY:
Build an apple like logo using Gimp
http://wickedowl.blogspot.com/2006/07/creating-apples-shiny-table-effect.html
http://www.ehow.com/how_6896439_make-apple_like-3d-logo.html

Metallic text (using gimp):
http://penguinpetes.com/b2evo/index.php?p=351

Online image editor : www.sumopaint.com

Note:
Windows desktop icon should be 32x32 px.
Apple icons are 57x57px
Android icons are  96, 72, 48, or 36 pixels wide, depending on screen densit

Tuesday, October 25, 2011

Android apps

Some useful android apps:

1. Data on demand - shutsdown wifi/3g when screen goes off. Saving bandwith/power. Nice green app
2. 3g watchdog - watch and optionally disable 3g if quota limit is reached. Very useful to avoid surprise bills for 3g overuse.
3. Advanced task killer


The apps i have released on Android market are below(these are quite crappy but hope to improve them as i find time)
1. Radio hindi



2. Ship control game  - It still needs lot  of improvement. But hey its my first android game..so be easy on me :)


Friday, August 12, 2011

Online Code generators

A nice code generator for php:
http://www.phpscaffold.com/

Java Spring projects:
http://www.springfuse.com/

Planning to write my junit code generator using japa..


Thursday, July 7, 2011

Keyboard music

Coding for long time can leave you stressed.

So why not heal yourself as you code with some soothing music? This program plays random notes when you type a key. The idea is to create soothing music for coders or anyone who spends time typing in front of pc(instead of the boring keyboard noise).

Guitar and piano notes are included in the bundle, but user can add their own notes as mentioned in steps to run(wiki link below).

Also planning to include auto suggest with it sometime (so you dont have to type a long sentence or word again).

Its partly implemented, but disabled in code at the moment.

 

There is lot more work to be done, like better notes etc. (I am no music expert). The basic idea is built and can be improved easily.

If you wish to contribute for develoopment, please let me know. The project will always be open sourced.

 

For details please follow wiki notes here

The project is open sourced here

 

Disclaimer:1.  The code captures keystrokes provided by JNativeHook.jar and it should not be used for malicious intent. I will be in no way held responsible for any misuse.

               2. The code built so far is basic and not yet fully tested. There is a possibility of notes played loud,etc. Please beware of this.

 



Gods Debris By Scott Adams

For a change have been reading a novel called Gods Debris by Scott Adams(creator of Dilbert comics). 

It has no plot as such but an exchange of ideas/ a perspective about god/ belief system/universe/ etc. 

In short it expands your imagination .

Though some concepts are abstract and made up, I enjoyed Gods debris and have started with his next book The Religion war (futuristic novel about Christianity and Islam) .

 Update: read The religion war. Quite nice! I am a fan of Scott Adams (his blog)

Gods Debris ebook is free here

The Religion War ebook can be found here

 

 



Friday, July 1, 2011

When Windows+Eclipse+Firefox slow down

All big garbage collected programs have a problem on MS Windows where, if you iconify them, the OS drastically reduces the working set size, making its VM pages available to other processes. When you restore the program, then the first time it tries to do a garbage collect (which could be several times a second) it can suffer a long pause while it brings in almost its entire virtual memory footprint in order to chase references. I've seen it take as long as 200 seconds to do this, during which time the program is unusable.

Workaround : use windows key + D or show desktop buttton instead of minimize.
More details

For eclipse performance imporvement, update shortcut as below:
"C:\Program Files\eclipse\eclipse.exe" -vm c:\j2sdk1.4.2\jre\bin\javaw.exe -vmargs -Xms64m -Xmx384m -XX:CompileThreshold=5 -XX:+UseParallelGC
The flags are discussed on the following website: http://www.burnthacker.com/archives/000049.html.