Friday, 28 November 2014

Thanks to SSR...



            First of all, thanks to SSR Project. You may be wondering what is SSR. SSR stands for Student Social Responsibility Project conducted by our college for all third year Engineering students. We can undertake any project that is socially challenging or beneficial. We were divided into teams of six. The first idea that clicked our brain was RCC visit at Trivandrum. We were so excited to move with that idea. Next day we contacted the RCC authorities. But BAD LUCK… They are not encouraging any outsiders due to infection threat to the patients. We had to drop our project . Then the next one…. Visiting Vimala Hridaya, school for mentally challenged children. We ran up and down the college for all the formalities and permissions. Finally we were all set by one evening. But again bad luck. That project was chosen by another team. Again disappointment… Then complete silence for a few days….
Then we came up with new more ideas. We wanted to do something that will stay in future in the name of our project. That’s how we thought of Self Defense for girls, Organic Gardening and Computer Skills for students. We wrapped these ideas into one project… TOGETHER TOWARDS A BETTER FUTURE.
As usual, we started up with a group discussion. We divided our project into three parts
Nirbhaya - Self defense class for girls
Swasth - Organic gardening
Aastha - Computer skills for students

 Here our journey starts….     
First step was to get a lady who is trained in martial arts. We came to know about one from our seniors. We ran to ashram(Mata Amritanandamayi Math) to meet her.. Again the luck factor plays the role. She went to Australia, her home town. Again disappointment. But, the people in International office gave us a ray of hope. They said that there is another lady who is trained in martial arts. They took our phone number telling that they will ask her to contact us. But, still the hope was too far… We waited for next two days for a phone ring… But nothing happened. Suddenly after some days we got a call. It was her, calling us asking to meet her. The very next day, we ran to ashram with all the hopes fulfilled. But when we saw her, we were hmmmmm. She is pretty old. Her name is Ms. Nirupama. She told us that she is no longer practicing and it would be hard for her to take a workshop. But we didn't give up. At last we got a YES from her. That was great a response. We are again in ON mode.
Things became more easy after meeting her. When we told her about the other two ideas, she took us to the organic garden there in ashram and we were directed to the organic farm near the ashram beach. But we couldn't meet the concerned person over there. We were asked to come on next day. Again next day… We went there and waited around 3 hours. Finally we met Gurudas swami who is in charge of Organic farming in ashram and he provided us with some vegetable seeds and saplings. Thus the day 13th November was fixed for the project and everything was done.

On 13th November 2014
By 8:30 am we reached ashram to pick Nirupama Ma’am. She was all set. We hired an auto to Thazhava higher secondary school. By 9:45 we reached the school. We could see many innocent faces looking at us amazingly. Something that took me to my past was the sight of teachers caning the students for silly reasons. It took sometime for us to get back from our childhood days. We spoke to the principal and we had to wait till 10:30 to start our session.
By 10:30 am, IXth standard students lined up and came to the library. Library was the spot allotted to us to conduct our session. All were very enthusiastic to know what is going to happen. We introduced ourselves and Nirupama Ma’am to them. It started with a warm up. She taught the basic methods of defending, when they are attacked from behind, front and various other directions. We ourself became trainers to them repeating what she does. It lasted for two hours.They were very eager to learn more. We had a great satisfaction when we saw their interest. They really didn’t want to leave Nirupama Ma’am. They hugged and kissed her. The session got over by 12:30 pm. Then it was time for lunch. School authorities had arranged lunch for us. After lunch, Nirupama Ma'am returned to ashram.
 

Then we had Organic farming where we took a session for Viith and VIIIth standard students. We were amazed to see their interest. More than us, they shared the knowledge and experieces. We talked about chemical pesticides and the future of mankind if we continue using chemicals in food. We also discussed about why Organic farming is important. We then distributed organic seeds, saplings and compost which we collected from ashram to the students. They promised that they will surely take care of the plants.
The next agenda was Computer Skills for IXth standard students. Due to time limit, we had to stop it in one hour. We taught them basic Linux commands and how to use Linux and its features. We also talked about Cyber crimes and security.
And, thus our project came to an end. We had a great time with students. Thanks for the students who corporated with us. We understood that they enjoyed it a lot and they need more programs from us. We got a very good feedback from the students and teachers. More than a project, it was an awesome learning experience.
A great thanks to our college CIR(Corporate and Industrial Relations) and the faculty members for giving us a Social Responsibility project to learn from experiences. Though we had hurdles in the beginning, everything went well with god's grace. Now, when we think of the difficulties we had, its a great joy to cherish. Once again I would like to quote “Experience is the best teacher”.

Friday, 21 November 2014

GNU General Public License


                     GNU General Public License is the widely used license for free software which ensures the users the right to study, copy, alter and share the softwares. Softwares that acquires these rights are called Free software. This License is first released by Richard Stallman of the Free Software Foundation(FSF) for GNU Project in 1989. This license is based on the copyleft principle. i.e, the chain of users involved should distribute their work or modifications that he/she has done to the software under the same license. It is the first copyleft license for general use.
                   The GPL accounted for nearly 65% of the 43,442 free softwares projects listed on Freecode as of August 2007 and about 68% of the projects listed on SourceForge.net by January 2006. Most widely used free software that are licensed under GPL includes Linux Kernel and GNU Compiler Collection(GCC). There are also some dual licensed free softwares like MySQL in which one being the GPL.
                  On 29 June 2007, the third new version of the license(GNU GPLv3) was released to solve the issues that GNU GPLv2 had. To keep the GPL updated, developers has the option to choose “any later version” clause. This is to choose between the original terms or terms imposed by the new version imposed by FSF. For example Linux Kernel is under GPLv2 without “any later version” clause.
Now let's see the different versions of the GPL
Version 1
                 The first version of GPL was released on 25th February 1989. It was mainly published to prevent the restrictions that violated the definition of the Free software. The first problem that GPL solved is that, the distributors were asked to produce the human readable form of the source code along with the binaries under the same licensing conditions.
The second problem was that vendors imposed additional restrictions to the license and combined softwares with other which had other restriction on its distribution. To avoid this GPLv1 said that altered or modified software as a whole has to be distributed under same conditions.
Version 2
               According to Stallman, the prominent change in GPLv2 was “Liberty or Death”. It states that, restrictions that prevent him or her from distributing GPL licensed software in a way that respects other users' freedom, he or she cannot distribute it at all.
Version 3
           GPLv3 was released on 29th June 2009 by Richard Stallman with legal counsel from Eben Moglen and the Software Freedom Law Center.
The major changes in GPLv3 are in relation to free software, software patents, “source code” definition and hardware restrictions on software modification. GPLv3 improves compatibility with several open source software licenses such as Apache License, version 2.0.
It was a long journey when they finally published the third version GPLv3 on 29th June 2009.

Thursday, 25 September 2014

Critical Section

In concurrent programming, Critical section is a set of statements that should be run exclusively . When multiple processes that shares same data are run simultaneously there are chances for the data to be inconsistent. So an operating system is designed in such a way that only one of the processes among them is allowed to access the shared data at a time. A critical section terminates in a fixed time, so a process or task must wait for that fixed time to enter its critical section.
Critical section is used when multi threaded programming need to manipulate a shared data without creating further threads conflicting the data. It also ensures that a shared device is accessed only by a single process at a time.
In single processor systems critical section can be implemented by disabling interrupts while entering the critical section, prevent system calls causing context switches while inside the critical section and restoring the interrupts while exit. With this implementation, any thread entering critical section any where in the system will prevent other thread trying to execute its critical section. Thus CPU can’t be accessed by any other process until the running process exits the CPU.
So far there are many algorithms that came up with solving the issues regarding the execution of critical section. The solutions for critical section is a wide area to discuss...

Tuesday, 12 August 2014

top and htop commands in Linux

        Linux provides utilities called top and htop to monitor the real time processes. They displays the dynamic real-time view of the running system. But, both the command are quite different in action.
Top command displays the Linux processes. It can display system summary information and processes or threads currently managed by the kernel.  When we type top in terminal we get the currently running process as shown in Fig 1.


                                              Fig 1:top  displaying running processes

Even though htop is quite similar to top there are some extra features that makes htop better command utility than top. The htop utility is not already built in Linux, it should be downloaded and installed. Once it is installed  it can be run through command line by just typing 'htop' (We can install it by just typing sudo apt-get install htop)

The Fig 2 shows the htop window look like,

                                                          Fig 2 :htop window


Now let's see what htop displays,

The top left corner:
The numbers 1,2,3 and 4 represents the number of cores in the system. The bars next to these numbers shows the loads on the cores. The colour difference in the bars represent different information. Below that lies memory and swap information.

The top right corner:
Here information related to  loads, threads, load average and up time are displayed. Load average is the amount of work that system does. Here in my system load average is 0.34 which means very less load on CPU. If it goes up to 2 it means that system is making use of CPU 100%.

Process related information:
The information about each process is divided into columns. The explanation of each column is as follows:


     PID: Process ID of a process
    USER: User owning the process
    PR: Priority of the process.
    NI: The nice value for a process.
    VIRT: Virtual memory consumption.
    RES: Physical RAM consumption in kilobytes.
    SHR: Shared memory consumption.
    S: Process status (sleeping, running etc).
    CPU%: CPU consumption
    MEM%: Physical RAM consumption.
    TIME+: Processor time used by the process.
    COMMAND: Command that started the process.

Htop provides many features to customize it according to user's taste. At the bottom of the htop window we can see F-keys and its function written next to them.

Saturday, 2 August 2014

Installing MariaDB

You can know what is MariaDB from my previous blog http://amruthasangeeth.blogspot.in/2014/06/mariadb_17.html


Now let’s see the installation of MariaDB
Step 1
First make sure that required packages are installed and  add apt-get key for Mariadb repository using following command
$ sudo apt-get install software-properties-common
$ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db

Add apt-get repository as per your Ubuntu version
For Ubuntu 13.10
$ sudo add-apt-repository 'deb http://ftp.kaist.ac.kr/mariadb/repo/5.5/ubuntu saucy main'
For Ubuntu 13.04
$ sudo add-apt-repository 'deb http://ftp.kaist.ac.kr/mariadb/repo/5.5/ubuntu raring main'
For Ubuntu 12.10
$ sudo add-apt-repository 'deb http://ftp.kaist.ac.kr/mariadb/repo/5.5/ubuntu quantal main'
For Ubuntu 12.04 LTS
$ sudo add-apt-repository 'deb http://ftp.kaist.ac.kr/mariadb/repo/5.5/ubuntu precise main'



Step 2
Install MariaDB using the following commands
$ sudo apt-get update
$ sudo apt-get install mariadb-server

Provide the root account password as given below


Step 3

Login to MariaDB using the following command after installation
mysql -u root -p




Creating a database in MariaDB
Entering the account administrator password set up during installation you will be given a MariaDB prompt.

We will create a database to learn on called students using the following command
CREATE DATABASE  students;
We will switch to the new database
USE  students;
Now the database is created and we can create a table.
CREATE TABLE details(student_id int(5) NOT NULL AUTO_INCREMENT,
                        name varchar(20) DEFAULT NULL,
                        age int(3) DEFAULT NULL,
                        marks int(5) DEFAULT NULL,
                        PRIMARY KEY(student_i)d
                        );
To accomplish what we have done, use the following command,
show columns in details;


Each column in table creation command is separated by comma and follows this fashion,
Column_Name Data_Type[(size_of_data)] [NULL or NOT NULL] [DEFAULT default_value]
[AUTO_INCREMENT]

The values of each column definition are,
* Column Name: Describes the attribute being assigned.
* Data Type: Specifies the type of data in the column.
* Null: Defines whether null is a valid value for that field. Can be "null" or "not null".
* Default Value: Sets the initial value of all newly created records that do not specify a value.
* auto_increment: MySQL will handle the sequential numbering internally of any column marked with this   option, in order to provide a unique value for each record.

Ultimately before closing the table definition we need to use primary key by typing PRIMARY KEY(column name).It guarantees that , this column will serve as a unique field.

Inserting data into MariaDB table
INSERT INTO details(name,age,marks) values ("anu",15,450);


INSERT INTO details(name,age,marks) VALUES("Bob",15,400);



We need not add values in student_id.It is automatically incremented.All other values are given in quotes.

Deleting a table
To delete a table, type the following command
DROP TABLE table_name;
Once the table is deleted, the data inside it cannot be recovered.

Now we can view the current table using “show tables” command. This command gives all the tables inside the database.
SHOW tables;
Then, after deleting the table.
DROP TABLE details;
Query OK, 0 rows affected (0.02 sec)

SHOW tables;

Tuesday, 29 July 2014

Database Languages


A database system provide Data Definition Language(DDL) to specify Database schema and Data Manipulation Language(DML) to express Database queries and updates. They are a part of a single Database language, such as the widely used SQL language.



Data Manipulation Language (DML)

DML allows users to acces and manipulate data as organized by the appropriate

data models.The types of access are,

* Retrieval of data

* Insertion of data

* Deletion of data

* Modification of data



Basically there are two types of DMLs,

1) Procedural DML

Here user need to specify what data and how to access that data

2) Declarative DML (Non procedural DML)

Here user need to specify what the data is and the DML will find an effective way to access those data



Therefore users mostly prefer Declarative DMLs since it is easier to learn and it can efficiently carry out data access.



Data Definition Language (DDL)

We specify database schema by a set of definitions and additional properties of data using DDL. We specify the storage structure and access methods used by Database system by a set of statements in a special type of DDL called data storage and definition language.

The DDL provides facilities to specify certain consistency constraints. Database system implement integrity constraints that can be tested with minimal overhead.



* Domain Constraints

Declaring an attribute like int, char as a specific domain acts as constraints on the values it can take. They are checked whenever new data items are entered.



* Referential integrity

There occurs some cases where we want a value appearingin one relation must appear in another relation. In some cases database modification cause violation in Referential integrity. When that happens, the action that causes the violation is rejected.



* Assertion

Assertion is any condition that a database must always satisfy. Domain constraints and Refrential integrity are other forms of assertions. When an assertion is created, system tests for its validity. If it is valid, database allows further modification if it does not cause any violation.



* Authorization

Users are differentiated according to type of access that they have to the database. This differentiation among the users are expressed in terms of Authorization.

The different types of authorizations are,

  • Read authorization
  • Insert authorization
  • Update authorization
  • Delete authorization

Data dictionary is a special type of table that can be accessed and updated by the database system itself. The database system consults the data dictionary before reading and modifying the data.

Friday, 4 July 2014

Web Syndication

Common Web feed icon
    First of all, what is Syndication? Basically syndication is the supply of material for reuse and integration with other material, often through a paid service subscription. The best example of web syndication is Newspaper. News agencies distribute contents to newspapers, they reformat it and integrate it with other copies and publish it.
    Web syndication refers to the websites providing information and the websites displaying it. ie, A section of a website is made available for other websites to use. For the providing sites, it is an exposure across numerous online platform. For the receiving sites, it is an effective way of adding depths to their sites and making it more attractive. Online content syndication is a rapid growing industrial sector in both hardware and software field. In the early days, syndication was a heavy manual process. Then an agreement reached favouring both supplier and customers reached. According to the agreement the customers would simply copy the desired content from the supplier's Web site and paste it into their own. Thus it became an easy process.
    In order to implement this new communication process, a series of XML files are defined. There is no standard format for Web syndication. To use this technology, site owners create or obtain specialized software (such as a content management system) which, in the machine-readable XML format, presents new articles in a list, giving a line or two of each article and a link to the full article or post. Web logs and news websites are common sources for web feeds, but feeds are also used to deliver structured information ranging from weather data to "top ten" lists of hit tunes. The term syndication is used to describe making available a feed for an information source. Like syndicated print newspaper features or broadcast programs, webfeed contents may be shared and republished by other web sites.

Tuesday, 1 July 2014

A Movie Review

THIRA


Thira is 2013 released movie directed by Vineeth Sreenivasan. It casts Dhyan Sreenivasan, Shobhana- the cenral character. The movie deals with human trafficking. This movie is an eye-opener against such crimes taking place in different parts of the country.

The film makes the debut of Vineeth Sreenivasan’s young brother Dhyan Sreenivasan and the return of actress Shobhana to Malayalam cinema after almost a decade. Vineeth Sreenivasan was inspired by the life of Sunitha Krishnan an Indian activist and founder of ‘Prajwal’ an institution that assist trafficked women and girls in finding the shelter.
Movie begins with the introduction of a cardiologist, Rohini Pranab (Shobhana), who apart from her job of a doctor also runs an organization for women which acts against women trafficking and helps orphaned girls. Things get into trouble when some girls from the organization get kidnapped.
Rohini sets out on a mission to find those who are behind her husband's murder and who have trafficked the girls. On the same path, we are introduced to Naveen (Dhyan Sreenivasan), who is in search of his kidnapped sister. Naveen and Rohini meet by chance and come to know that they have the same goal. Rest of the movie focuses on their mission to find the lost ones. The story is set in Kerala and Goa. Both of them finally identify the secret place where the trafficked girls are kept and release with the wise help from Rohini and action from Naveen.
Thira merely reminds us that even those with eyes, see only that which they want to see through the scene of girl being kidnapped in the middle of the city in a day.
The main issue with stories of these kinds is that they have a predictable pattern with real events happening only at the beginning and then towards the end. What keeps the viewers glued on to such films are the portions that connect these two ends. Rakesh Mantodi's script (co-written by Vineeth Sreenivasan) barely manages to make things interesting and gripping beyond a point. Also, the dialogues have been written in an old fashioned style.

. 'Thira' does require an actress of great caliber, and Shobhana delivers an incredible performance and Dhyan Sreenivasan makes a notable debut as well, though he does need to work on his dubbing skills.

Sunday, 22 June 2014

A Book Review

HOW I BRAVED ANU AUNTY AND CO-FOUNDED A MILLION DOLLAR COMPANY  -Varun Agarwaal

         Varun Agarwaal, the author of this book is a young entrepreneur of India. This book inspires the reader to live their dream. In a country like India it is hard to fulfill one’s dream on their profession.
Here Varun Agarwaal teaches us to walk in our way which we trust to be successful. We live to achieve what we want to be, not anyone else’s life.
The main character in this story is Anu Aunty, his mother’s close friend. From his child hood onwards she brainwashes his mother Poornima about his career. She believes being a techie is the best job that anyone can achieve. But, Varun wanted a complete change from what others are doing. He dreams of becoming an entrepreneur. He plans of starting a company with his close friend Rohn Malhothra. His Mal. Varun and his friends hangout at different places in Bangalore. The plan of his company was sprouted in such a meeting at Noon Wines, one of the old pub in Bangalore. Both Varun and Mal planned to work on an idea - School Merchandising, which means making hoodies, tees etc for the alumni of schools, colleges and passing out batches of institution. They proceeded with their idea while their parents and rest of their friends were ignorant about it. 
But Varun’s mother was always worried about him and his future. She is tensed that Varun has not got a job yet while his friends are pursuing MBA and applying for higher education. The repeated addition of phrases like ‘Thunder, lightening, rain, old Hindi movie soundtrack’ makes the situation funny.
       Anu aunty was always behind him. Her son Arjun is good at studies and extracurricular activities. He is a techie now. Whenever Anu aunty and Varun’s mother meet together Anu aunty injects possessiveness in her mind by comparing Varun and Arjun. 
       Varun is very much confident on his new start up. The first thing did they did was, they  searched for a manufacturer. They came across three manufacturers whom they had to strike off due to financial issues. Finally they ended up with a manufacturer from Tirupur who is Mal’s brother’s friend. He gave all the support for their start up. During the business journey Varun discovered that the best lessons of marketing and business can be learned from the kitty parties of aunties. 
     In the following days they met the manufacturer, shipped the material and their first motto was Bishop Cotton Boys’ School. Their first business went well. They declared a name for their start up- Alma Mater. They took a lot of effort for their website, business cards etc. Slowly their business spread worldwide. He discovered that the best way of marketing their product is through E-commerce. 
    He went through many challenges and difficulties for the success of their dream. It was he himself and Mal worked very hard without the help of any employees for establishing their company.

    Varun’s book reflects the life many of us are leading or forced to lead. There would be an Anu aunty in everyone’s life that becomes a hurdle for making our dream come true. What we see here is instead of simply bowing down to the pressure of Anu aunty and her friends, Varun decide to tread the unconventional path.
    So, through this book Varun gives a practical guide to entrepreneurship to all who wants to fulfill their dream. 



Tuesday, 17 June 2014

MariaDB


MariaDB is a high performance, open source database that helps the world's busiest websites deliver more content, faster, to all its users. It is developed by the developers of MySQL with the help of Free and Open Source software community and is a fork of MySQL. It offers various features and enhancements like alternate storage engines, server optimizations and patches.
The  lead developer of MariaDB is Michael "Monty" Widenius, who is also the founder of MySQL and Monty Program AB.
It is not a single person or a company that is developing the MariaDB/MySQL developments. It is the guardian of the  MariaDB  community that drives it. MariaDB foundation has the trademark of MariaDB server and owns mariadb.org. This ensures that official MariaDB development tree is always opened for the developer community. MariaDB foundation ensures that all the community patches, including MySQL source code are matched into MariaDB and also provides a lot of documentation. MariaDB is a registered trademark of SkySQL Corporation Ab used by MariaDB Foundation with permission.
It is the best choice for database professionals looking for best and robust SQL server.