Sunday, August 26, 2018

IT Industry in India



A series of events occurred about couple of centuries ago that brought huge changes in the way people lived. That was the time when big machines and factories were built. Adoption of manufactured goods increased exponentially. It started the world's first Industrial revolution in England. Before the Industrial revolution the way people lived was entirely different, no electricity, no Television, no movies, no automobiles, no railways, and no machines. People didn't travel much, mostly they lived their entire life in their own village. 90% people lived in rural areas. The world was very quiet before the industrial revolution. Most of the people were poor, and only a tiny percentage of them were highly rich. There was no middle class people as such. After the industrial revolution there were big factories all over Europe and America. Thousands of workers started working, more and more people started living in urban areas, cities started to grow fast.



Basically there have been three basic industrial revolutions. The first was between 1750 and 1830 which was the rise of the steam engines, the locomotives, the telegraph and the textile industry. The second phase happened during 1870 to 1900, when the world witnessed the rise of electricity, the internal combustion engine, hydro power, plastics, chemicals and similar things that came on that era. The third phase of industrial revolution is the recent one which is the rise of computers, internet, and mobile phones. India missed out the initial two phases of the industrial revolution as it was not an independent country that time. But the nation has utilised the third phase i.e. the information technology revolution to its full potential.

According to Forbes India the seed for the information technology (IT) revolution was planted during Rajiv Gandhi’s time. During the 80s, USA and some other European countries had developed super computers, which were critical for developing satellites and nuclear weapons. These countries refused to transfer the knowledge of creating super computers to India, fearing India might use it to design missiles and warplanes rather than weather forecast. The supercomputer effort in India began in the late 1980s, when the US stopped the export of a Cray supercomputer. Without any other alternative India set up Centre for Development of Advanced Computing (C-DAC) in March 1988 with an objective to develop an indigenous supercomputer to meet high-speed computational demands in solving scientific and other developmental problems. To lead the project, PM Rajiv Gandhi turned to Vijay Pandurang Bhatkar. Just within three years in 1991, C-DAC rolled out India’s first indigenous supercomputer: PARAM 8000. For the first time ever, a developing country achieved such success in advanced computer development. Vijay Bhatkar is regarded as the Father of Indian Supercomputers. In 2015, he was honoured with Padma Bhushan for his extra ordinary contribution in the field of science and technology in India. Vijay Bhatkar once said, "Great nations are not built on borrowed technology".




Information technology has redefined human life in a radically new way. Computers have been with us for more than half a century now, starting from basic transistor driven devices, they have evolved through many generations in hi-tech and sophisticated equipment. Such machines connected the entire world. The IT revolution has touched every aspect of our life, be it banking, telecommunication, healthcare, transportation, hotel, real estate, and literally everything in today's word are embedded with information technology. According to Wikipedia information technology in India is an industry consisting of two major components: IT services and business process outsourcing (BPO). The sector has increased its contribution to India's GDP from 1.2% in 1998 to 7.5% in 2012. According to NASSCOM, the sector aggregated revenues of US$160 billion in 2017, with export revenue standing at US$99 billion and domestic revenue at US$48 billion, growing by over 13%. USA accounts for more than 60 per cent of Indian IT exports.

Information technology has connected the entire world, as if the world is like a global village, and it created an opportunity for lot of innovations. In the last decade we have seen the rise of social media, and how it has influenced human emotions. These days people can't imagine life without Facebook, Twitter, WhatsApp or LinkedIn to mention a few of social media. Everything is becoming online, be it shopping, food, movie tickets, Railways, flight ticket booking, or Government services, everything is becoming online. Information technology is really boosted with the mobile phone revolution. In today's world almost every human being carries the entire world with him/her in the form of a mobile phone with tremendous computing power. With the introduction of Global Positioning System (GPS) in the market, which initially started in the US for its military use, lot of innovations happened in the field. The mobile applications really changed the way we live. It simply gave a new dimension to the IT revolution. These days one doesn't need a computer or a laptop for personal IT related stuffs, everything can be done through smart phone. There are Apps for almost anything, you just browse it, and it would be available in seconds.

With such rapid development in the world of information technology, there's just too much of data flowing around. According to statistics an average internet user generates about a GB of data per day. Nowadays, even start-up companies have to deal with terabytes of data right from the very first year of business. Such huge volumes of data created doors for new technologies and innovations. Big Data, Data Analytics, Machine Learning, Artificial Intelligence. These modern technologies makes use of data to analyse them, and then create intelligence in the software to enhance their business. The world, and definitely information technology is aggressively moving towards automation, AI, Big Data, Data Analytics, Machine Learning, and IOT (Internet of Things) are the immediate future. 



Pretty soon all the cars, buses and trucks are going to be driverless. After a couple of decades quite possibly there wouldn't be any farmers working on the fields, the Robots would simply take over. There won't be much of human Military in future, it would be Machine Army. There's rapid development happening in the field of space and rocket science as well. With Elon Musk's SpaceX's very successful reusable launch system development program, the cost of space travel has reduced considerably. In the next few decades the present most popular form of long distance travel (aeroplane) would become outdated. Soon humans would start travelling by rocket, and one would be able to reach any city from any other part of the world in just 30 minutes.

Information technology has really changed the world, and it’s evolving at a massive pace. The future is quite uncertain though, with Machines taking over almost 80 percent of the human jobs. But it happened in the past as well. Automation results in mass job loss, but it creates opportunity for new innovations, and new kind of job market. It would be really interesting to see where this information technology would reach in next 30 years.



This article was first published in "Uruli", a biannual multilingual magazine published by Assam Association Bangalore.

Monday, August 20, 2018

Understanding Recursion with the Factorial Example



Programming languages usually have their own internal Stack. In case of Java it’s the Java Stack. When any new thread is launched, the JVM creates a new Java stack for the particular thread. It stores the thread’s state in discrete frames. The JVM performs PUSH and POP operations on the Java stack.

When a thread invokes a method, JVM creates a new frame and pushes it on to the Java stack. The newly pushed frame becomes the current frame. As the method executes, it uses the frame to store parameters, local variables, intermediate computations, and other data.

Recursion is the process in which a function calls itself. The function is called as recursive function. A recursive function performs a bigger task part by part by calling itself to perform the subtasks. Every recursive function has a base case, it’s the point when the function is able to return some value without calling itself. Below is the format of a recursive function.

if(Base case) {
            return Base Case Value;
} else {
            return (Compute some work followed by recursive a call)
}

Code to find the factorial of an integer:

public static int factorial(int n) {
            if(n==0 || n==1){
                        return 1;
            }
            return n * factorial(n-1);
}

Let’s try to visualise the flow of execution of the above piece of code. Factorial of 5 is 120.
Factorial of 5 = 5 * 4 * 3 * 2 * 1 = 120


When the factorial method is called with 5, JVM creates a frame and pushes it onto the Java stack.



Now the code returns '5 * factorial(4)'. Since, once again there’s a method call (same factorial method), JVM creates a new frame and pushes it on the Java stack.



Similarly, the method keeps calling itself till it reaches the base case.




Once base case is reached it returns without making any recursive call. In our case when factorial is called with 1, it simply returns 1. JVM pops the current frame, the result of the subtask(1) is required by the next frame for computation.



Now, the top most frame is again popped. The result is computed to be 2. This result is used to compute the next frame.



Now the current stack frame computes the result (3*2 = 6), and JVM pops the frame from the Java stack.



Now, the current frame computes the subtask result (4 * 6 = 24). JVM pops the frame from the Java stack.



Now, there’s only one frame on the Java stack. It computes the final result (5 * 24 = 120). 



JVM pops the frame, and the recursive function completes.

We will try out some more recursive functions. Hope you've enjoyed the post :)